fix: resolve template-injection issues and harden workflows#691
Merged
rapids-bot[bot] merged 9 commits intorapidsai:mainfrom Apr 27, 2026
Merged
fix: resolve template-injection issues and harden workflows#691rapids-bot[bot] merged 9 commits intorapidsai:mainfrom
rapids-bot[bot] merged 9 commits intorapidsai:mainfrom
Conversation
Do we actually need pull_request_target here? Or would `pull_request` be good enough?
gforsyth
commented
Apr 24, 2026
Comment on lines
+26
to
32
| switch(context.eventName) { | ||
| case 'pull_request': | ||
| case 'pull_request_target': | ||
| return '${{ github.ref }}'.split('/')[2]; | ||
| return context.ref.split('/')[2]; | ||
| case 'push': | ||
| const branch = '${{ github.ref_name }}'; | ||
| const branch = context.ref.replace(/^refs\/(heads|tags)\//, ''); | ||
| if (!branch.match(new RegExp('^pull-request/[0-9]+$'))) { |
Contributor
Author
There was a problem hiding this comment.
I believe these are equivalent. They also aren't realistic injection targets, I don't think. I can mark them as # zizmor: ignore[template-injection] instead if folks prefer
Comment on lines
+23
to
+25
| run: | # zizmor: ignore[github-env] | ||
| echo "HOME=$RUNNER_WORKSPACE" >> "$GITHUB_ENV"; | ||
| echo "TMPDIR=$RUNNER_TEMP" >> "$GITHUB_ENV"; |
Contributor
Author
There was a problem hiding this comment.
zizmor is scared of all mutation of GITHUB_ENV -- this is a pretty benign mutation
Contributor
Author
|
/ok to test |
bdice
approved these changes
Apr 27, 2026
bdice
reviewed
Apr 27, 2026
Contributor
There was a problem hiding this comment.
Maybe add a CI job that enforces this.
Contributor
Author
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
persist-credentialsto prevent credential leakage