Repository navigation
CI: pin lockfile-audit actions to commit SHAs - #6902
Merged
Merged
Conversation
lockfile-audit.yml is the only workflow still referencing GitHub Actions by mutable tag (actions/checkout@v4, actions/setup-python@v5). Every other uses: across .github/workflows/ is pinned to a 40-char commit SHA, and security-audit.yml's Actions pinning verifier exists to flag exactly this gap. A force-moved tag (the tj-actions/changed-files attack class) could otherwise redirect this audit job to an arbitrary commit. Pin both to the SHAs behind the versions the rest of the tree is moving to (checkout v7.0.0, setup-python v6.3.0). The open Dependabot actions bump only advances these two refs to the mutable tags @v7 / @v6, so it does not close this gap; SHA-pinning here is still needed for lockfile-audit.yml to match every other workflow and satisfy the pinning verifier. Dependabot's github-actions ecosystem keeps the SHAs current afterwards.
Contributor
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Member
|
@codex review |
1 similar comment
Member
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
danielhanchen
approved these changes
Jul 6, 2026
danielhanchen
left a comment
Member
There was a problem hiding this comment.
Verified both pinned SHAs resolve to the upstream checkout v7.0.0 and setup-python v6.3.0 tags, and that these were the only remaining mutable-tag references across the workflow tree. Thanks for closing the gap.
This was referenced Jul 22, 2026
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.
Problem
.github/workflows/lockfile-audit.ymlis the only workflow still referencingGitHub Actions by mutable tag:
Every other
uses:across.github/workflows/is pinned to a full 40-charcommit SHA, and
security-audit.yml's "GitHub Actions pinning verifier" stepexists specifically to flag non-SHA-pinned references. A mutable tag can be
force-moved to an arbitrary commit (the class of attack behind the
tj-actions/changed-files compromise that the harden-runner comments already
cite), so these two lines are the one spot in the tree where that mitigation is
missing.
The blast radius is limited: this job only runs
python3 -c ast.parseplusscripts/lockfile_supply_chain_audit.pyunderpermissions: contents: read,so a hijacked action here could tamper with the audit result or read the
read-scoped token, but not write to the repo. It is still a real
self-consistency gap in the supply-chain hardening the project clearly cares
about.
Fix
Pin both references to the commit SHAs behind the versions the rest of the tree
is already moving to, keeping the repo's
SHA # vX.Y.Zcomment format:actions/checkout@v4->actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0actions/setup-python@v5->actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0Both SHAs were verified against the upstream tag refs. After this change, no
uses:in.github/workflows/resolves to a mutable tag. Dependabot'sgithub-actionsecosystem keeps the SHAs current afterwards, exactly like everyother reference.
Notes
An open Dependabot actions bump (#6893) advances every other
checkout/setup-pythonreference across the workflow tree to these same two SHAs(v7.0.0 / v6.3.0), but for this file it only bumps the two lines above to the
mutable tags
@v7/@v6. So it does not close this gap; if it merges as-is,lockfile-audit.ymlbecomes the only file left with mutable-tag first-partyreferences. SHA-pinning here is still required for this workflow to match the
rest of the tree and satisfy the pinning verifier.