Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: security test #106

Closed
wants to merge 6 commits into from
Closed

fix: security test #106

wants to merge 6 commits into from

Conversation

4bg0P
Copy link
Contributor

@4bg0P 4bg0P commented Jan 16, 2025

This MR aims to test a security vulnerability

This MR aims to test a security vulnerability
@4bg0P 4bg0P requested a review from a team as a code owner January 16, 2025 09:43
@4bg0P 4bg0P marked this pull request as draft January 16, 2025 09:43
@4bg0P 4bg0P marked this pull request as ready for review January 16, 2025 09:51
@4bg0P 4bg0P marked this pull request as draft January 16, 2025 09:51
@4bg0P 4bg0P marked this pull request as ready for review January 16, 2025 09:59
@4bg0P
Copy link
Contributor Author

4bg0P commented Jan 16, 2025

Hey @m4rii0,

I hope you are doing good! Following my last merged MR, I am considered as a contributor of the repository. I'm now able to run any "pull_request" trigger of the repository without any review from other contributors or maintainers.

To be 100% transparent, I'm part of the Inditex bug bounty program and I wanted to test if I was able to retrieve the SONAR_TOKEN secret from this repository (and I failed).

The PR-verify GitHub action (https://github.com/InditexTech/gh-sherpa/blob/main/.github/workflows/PR-verify.yml) is dangerous, as it's checking-out the code of the pull-request and then execute the make verify command.
As the workflow checks-out the code of the pull-request, the author of the pull-request can modify Makefile to make the make verify execute any attacker controlled command.
I've achieved it, and tried to retrieve the SONAR_TOKEN secret, but it was only available in the sonar-related step.

I'm not writing a bug bounty report out-of-it as the impact is low and not explicitly in-scope, but I still thought you should be aware of it.

Have a great day,
Théo

@danielfn
Copy link
Member

Hi @4bg0P,

As @m4rii0 said in the other PR, good catch, again ;)

Due to the workflow design, the `make verify' should not have access to any exposed secrets in the workflow, but you are right that we still need to have tighter control over what can be run in it. Also, as of this moment, we are changing our policy for running fork pull request workflows from contributors to require approval for all external contributions, not just first-time contributors. Thanks for your suggestions!

@danielfn danielfn closed this Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants