ci: pin GitHub Actions to commit SHAs - #96
Conversation
Hardening per standard §5.3: pin all mutable-tag third-party actions in the build workflows (ci, docs, release, codeql) to full commit SHAs. SHAs are dereferenced to commits; the human-readable version stays in a trailing comment so Renovate can keep them current. Local composite refs (./.github/actions/*) and already-pinned refs are left untouched.
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR improves CI/CD supply-chain security by replacing mutable GitHub Actions version tags (e.g., @v7) with immutable 40-character commit SHAs across the repository’s build workflows, while retaining human-readable versions via trailing comments for tooling like Renovate.
Changes:
- Replaced third-party
uses:references from mutable tags to full commit SHAs across CI, docs, release, and CodeQL workflows. - Preserved the semantic action version in trailing comments (e.g.,
# v7.0.1) to maintain readability and automated update support.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/ci.yml | SHA-pins actions/checkout, codecov/codecov-action, and actions/cache used in CI jobs. |
| .github/workflows/docs.yml | SHA-pins Pages build/deploy actions (checkout, upload-pages-artifact, deploy-pages). |
| .github/workflows/codeql.yml | SHA-pins checkout, setup-java, cache, and CodeQL init/analyze actions. |
| .github/workflows/release.yml | SHA-pins actions used in release publishing, attestations, SBOM generation, and release asset attachment. |
What
SHA-pin all mutable-tag third-party GitHub Actions in the build workflows to full commit SHAs, per standard §5.3 supply-chain hardening.
Why
Mutable tags (
@v7,@v4, …) can be silently repointed at malicious commits. Pinning to a 40-char commit SHA makes each action reference immutable. The human-readable version is preserved in a trailing# vX.Y.Zcomment so Renovate can continue to bump them.Changes
Pinned refs across the build workflows:
actions/checkout@v7→3d3c42e5…(v7.0.1),codecov/codecov-action@v7→fb8b3582…(v7.0.0),actions/cache@v6→55cc8345…(v6.1.0)actions/checkout(v7.0.1),actions/upload-pages-artifact@v5→fc324d35…(v5.0.0),actions/deploy-pages@v5→cd2ce8fc…(v5.0.0)actions/checkout(v7.0.1),actions/attest-build-provenance@v4→0f67c3f4…(v4.1.1),softprops/action-gh-release@v3→3d0d9888…(v3.0.2),anchore/sbom-action@v0→e22c3899…(v0.24.0)actions/checkout(v7.0.1),actions/setup-java@v5→03ad4de0…(v5.6.0),actions/cache(v6.1.0),github/codeql-action/initand/analyze@v4→e0647621…(v4.37.2, matching the file's already-pinnedupload-sarif)Local composite refs (
./.github/actions/gradle-setup) and already-pinned refs (all of scorecard.yml) are untouched.Verification
grep -rnE 'uses: [a-zA-Z].*@v[0-9]' .github/workflows/returns no matches — every third-party ref now ends in a 40-char SHA. Diff is 30 insertions / 30 deletions, each a pure ref swap with indentation unchanged.