Repository navigation
fix(ci): pin GitHub Actions to commit SHAs instead of mutable version tags - #2350
Merged
Merged
Conversation
… tags Closes #2170 Every uses: line across the 12 remaining workflows referenced a mutable major/minor version tag (actions/checkout@v7.0.1, actions/setup-node@v7.0.0, dtolnay/rust-toolchain@stable, Swatinem/rust-cache@v2, actions/cache@v6, actions/upload-artifact@v4/v7, actions/download-artifact@v4/v8, actions/setup-python@v7, actions/setup-go@v7, actions/github-script@v9, contributor-assistant/github-action@v2.6.1). If any of these tags is ever repointed (upstream compromise or accidental force-push), the next CI run executes unreviewed code with whatever permissions that job holds. Pinned every uses: line to the exact commit SHA the tag currently resolves to (resolved via `gh api repos/<owner>/<repo>/git/refs/...`), each with a trailing `# <tag>` comment for human readability, matching the pattern update-recall-floors.yml already used. anthropics/claude-code-action was already SHA-pinned. dependabot.yml already has a github-actions ecosystem entry, so these pins will get automatic bump PRs going forward. Verified with actionlint: identical warning set before and after (249 lines, byte-for-byte same content) — this change introduces zero new findings and fixes zero unrelated ones.
Contributor
Greptile SummaryThis PR hardens GitHub Actions supply-chain security by replacing mutable third-party action tags with immutable commit SHAs while retaining version comments for maintainability.
Confidence Score: 5/5The PR appears safe to merge, with no concrete regressions identified in the action-pinning changes. The changes consistently replace mutable action references with syntactically valid immutable revisions while preserving workflow inputs, conditions, permissions, and behavior. Important Files Changed
Reviews (1): Last reviewed commit: "fix(ci): pin GitHub Actions to commit SH..." | Re-trigger Greptile |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Closes #2170
Every
uses:line across the 12 remaining workflows referenced a mutable major/minor version tag (actions/checkout@v7.0.1,actions/setup-node@v7.0.0,dtolnay/rust-toolchain@stable,Swatinem/rust-cache@v2,actions/cache@v6,actions/upload-artifact@v4/v7,actions/download-artifact@v4/v8,actions/setup-python@v7,actions/setup-go@v7,actions/github-script@v9,contributor-assistant/github-action@v2.6.1). If any of these tags is ever repointed (upstream compromise or accidental force-push), the next CI run executes unreviewed code with whatever permissions that job holds.update-recall-floors.ymlalready followed the safe pattern; everything else didn't.Fix
Resolved the exact commit SHA each tag currently points to (via
gh api repos/<owner>/<repo>/git/refs/..., dereferencing annotated tag objects where needed) and pinned everyuses:line to<sha> # <tag>, matchingupdate-recall-floors.yml's existing style.anthropics/claude-code-actioninclaude.ymlwas already SHA-pinned..github/dependabot.ymlalready has agithub-actionsecosystem entry on a weekly schedule, so these pins will get automatic bump PRs going forward — no new Dependabot config needed.Local (
./.github/workflows/...) and reusable-workflow (workflow_call) references are untouched — same-repo refs move with the branch, so pinning them would just be noise.Test plan
python3 -c "import yaml; ..."— all 14 workflow files parse as valid YAML.actionlint .github/workflows/*.yml— byte-identical warning output (249 lines) before and after this change on every file; introduces zero new findings, fixes zero unrelated ones (all pre-existing warnings are shellcheck notes onrun:scripts, out of scope here).actions/checkout@v7.0.1,actions/setup-node@v7.0.0) exactly match the SHAs already committed inupdate-recall-floors.yml.