ci: pin GitHub Actions to full commit SHAs for supply-chain hardening#32
Conversation
Pin every GitHub Actions step in ci.yml and codeql.yml to a full commit SHA with a trailing `# vX.Y.Z` comment that Dependabot keeps fresh, so a force-moved tag can no longer inject untrusted code into CI. dtolnay/rust-toolchain has no semver releases, so pin it to a master commit SHA and select the Rust version via the `toolchain:` input (1.96.0 for ci, 1.90 for msrv); add a Dependabot ignore for it and update the rust-toolchain.toml cross-reference to point at that input. Closes #31 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAll third-party action references in ChangesSupply-chain hardening: SHA-pin all actions
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Closes #31
What
Pin every GitHub Actions step in
ci.ymlandcodeql.ymlto a full commit SHA, with a trailing# vX.Y.Zcomment that Dependabot uses to keep the version fresh. A force-moved tag can no longer inject untrusted code into CI.actions/checkout@9c091bb # v7.0.0(ci + codeql)Swatinem/rust-cache@c193711 # v2.9.1taiki-e/install-action@9e1e580 # v2.82.2actions/upload-artifact@043fb46 # v7.0.1github/codeql-action/{init,analyze}@8aad20d # v4.36.2dtolnay/rust-toolchain@67ef31d # master+toolchain:inputdtolnay/rust-toolchainpublishes no semver releases, so it's pinned to amastercommit SHA and the Rust version is selected via thetoolchain:input (1.96.0forci,1.90for the MSRV job — both quoted so YAML doesn't coerce1.90to the float1.9). It's added to the Dependabotignorelist (no release stream to track) and therust-toolchain.tomlcross-reference now points at that input instead of the removed@<version>ref.Verification
git ls-remote— including dereferencing annotated tags (v2.9.1^{},v4.36.2^{}) to their commit SHAs.master'saction.ymldeclares thetoolchain(required) andcomponentsinputs the workflows pass.just cipasses locally; pre-push hook re-ran the full gate green.🤖 Generated with Claude Code
Summary by CodeRabbit