Skip to content

ci: pin GitHub Actions to commit SHAs - #96

Merged
jamesarich merged 1 commit into
mainfrom
ci/sha-pin-actions
Jul 23, 2026
Merged

ci: pin GitHub Actions to commit SHAs#96
jamesarich merged 1 commit into
mainfrom
ci/sha-pin-actions

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

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.Z comment so Renovate can continue to bump them.

Changes

Pinned refs across the build workflows:

  • ci.ymlactions/checkout @v73d3c42e5… (v7.0.1), codecov/codecov-action @v7fb8b3582… (v7.0.0), actions/cache @v655cc8345… (v6.1.0)
  • docs.ymlactions/checkout (v7.0.1), actions/upload-pages-artifact @v5fc324d35… (v5.0.0), actions/deploy-pages @v5cd2ce8fc… (v5.0.0)
  • release.ymlactions/checkout (v7.0.1), actions/attest-build-provenance @v40f67c3f4… (v4.1.1), softprops/action-gh-release @v33d0d9888… (v3.0.2), anchore/sbom-action @v0e22c3899… (v0.24.0)
  • codeql.ymlactions/checkout (v7.0.1), actions/setup-java @v503ad4de0… (v5.6.0), actions/cache (v6.1.0), github/codeql-action/init and /analyze @v4e0647621… (v4.37.2, matching the file's already-pinned upload-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.

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.
Copilot AI review requested due to automatic review settings July 23, 2026 00:36
@jamesarich
jamesarich enabled auto-merge July 23, 2026 00:36
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jamesarich, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a870278e-fc4f-4210-a8f6-d3d9cb07d87a

📥 Commits

Reviewing files that changed from the base of the PR and between 547a060 and 078f3b1.

📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • .github/workflows/codeql.yml
  • .github/workflows/docs.yml
  • .github/workflows/release.yml

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jamesarich
jamesarich added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit 57b7515 Jul 23, 2026
15 checks passed
@jamesarich
jamesarich deleted the ci/sha-pin-actions branch July 23, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants