-
Notifications
You must be signed in to change notification settings - Fork 804
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
Avoid interpolating values into bash #4774
Conversation
This can lead to code execution. See https://woodruffw.github.io/zizmor/audits/#template-injection for details
env: | ||
# Don't put these in bash, because we don't want the expansion to | ||
# risk code execution | ||
BASE_REF: "refs/heads/{{ github.event.pull_request.base.ref }}" |
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.
BASE_REF: "refs/heads/{{ github.event.pull_request.base.ref }}" | |
BASE_REF: "refs/heads/${{ github.event.pull_request.base.ref }}" |
I think this one is missing a "$" for expansion? At least it is currently broken in #4768
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.
Sigh, yes.
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.
Oops! 🙈
This can lead to code execution. See https://woodruffw.github.io/zizmor/audits/#template-injection for details
This can lead to code execution. See https://woodruffw.github.io/zizmor/audits/#template-injection for details
This can lead to code execution. See https://woodruffw.github.io/zizmor/audits/#template-injection for details