Repository navigation
Potential fix for code scanning alert no. 41: Checkout of untrusted code in a non-privileged context #2318
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
Draft
don-petry
wants to merge
6
commits into
main
Choose a base branch
from
alert-autofix-41
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Potential fix for code scanning alert no. 41: Checkout of untrusted code in a non-privileged context #2318
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c6c764a
Potential fix for code scanning alert no. 41: Checkout of untrusted c…
don-petry 6d7e8e5
fix(reviews): pass agent_ref via env instead of inline expression int…
don-petry 879e075
Merge main (org renamed to combsmith) into alert-autofix-41
don-petry 44881be
fix(reviews): hand validated agent_ref to checkout via step output, n…
don-petry 2b870a5
Merge branch 'main' into alert-autofix-41
don-petry c46dc7e
Merge branch 'main' into alert-autofix-41
don-petry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
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.
[High] Requiring
inputs.agent_refto be a 40-character commit SHA (! [[ "$ref" =~ ^[0-9a-fA-F]{40}$ ]]) and rejecting empty, branch, or tag refs breaks everydev-leadcaller across the organization. Perstandards/ci-standards.md,tests/test_sc2_self_review_channel.bats, andtests/dev-lead/integration/test_reusable_pin_compliance.py, caller stubs must pass a moving channel tag (dev-lead/v139-stable,dev-lead/v139-ring0, etc., or omit it to default tomain) and are forbidden from SHA-pinningagent_ref. With this check in place,dispatchruns at line 256 using the channel tag, and this job then unconditionally fails at line 802. Validate against the alloweddev-leadchannel/tag pattern (^main$|^dev-lead/(v[0-9]+(\.[0-9]+\.[0-9]+|-(stable|next|ring[0-9]+))|stable|next|ring[0-9]+)$, defaulting empty input tomain) instead of requiring a 40-hex SHA.