-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 command injection vulnerability in Github workflow #9542
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested this in my fork, i was able to inject before this change and was not able to do so after them.
I am sorry that i missed this when introducing this new feature.
@chris48s @calebcartwright Sorry to ping you but this seems to require a quick response I think its best to report those type of things at security@shields.io and not publicly. |
Sorry for the oversight. I thought it's a small patch that I could do it myself. will be careful next time. |
To try and estimate the damage made so far i went to the action log at https://github.com/badges/shields/actions/workflows/test-bug-run-badge.yml and checked all runs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for discovering and fixing this issue @arunstar! I'll second @jNullj on how it would have been best to report his, but if you missed it, it may simply be that the policy is not discoverable enough, and that's on us/GitHub. As a quick win, I'll point to the policy in the security
label, this will help surface it a little.
Thanks for checking impact @jNullj!
Another small thing that may help: #9544 |
Thanks all 👍 I've raised #9547 as a follow up to this. |
github.event.issue.body
is potentially untrusted. Avoid using it directly in inline scripts. instead, pass it through an environment variable.See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details