Skip to content

ci: pin actions to commit SHAs - #21

Merged
muneebs merged 1 commit into
mainfrom
ci/pin-actions-to-sha
Aug 2, 2026
Merged

ci: pin actions to commit SHAs#21
muneebs merged 1 commit into
mainfrom
ci/pin-actions-to-sha

Conversation

@muneebs

@muneebs muneebs commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

Tags are mutable. actions/checkout@v4 resolves to whatever the v4 tag points at today — a repointed or compromised tag silently changes what runs in a workflow that signs and publishes release artifacts.

Pins all four actions to full commit SHAs so sha_pinning_required can be enabled for the repository. Same guarantee the immutable-releases work gives the outputs, applied to the build inputs.

Action SHA Was
actions/checkout 11d5960a326750d5838078e36cf38b85af677262 v4
actions/setup-go 40f1582b2485089dde7abd97c1529aa768e1baff v5
goreleaser/goreleaser-action e435ccd777264be153ace6237001ef4d979d3a7a v6
actions/attest-build-provenance e8998f949152b193b063cb0ec769d69d929409be v2

Version stays in a trailing comment so the file is still readable.

Context — why the tag builds were failing

Unrelated to the workflow syntax. The repo's Actions policy had been set to local_only, which blocks every external action including actions/checkout. Every run since came back startup_failure with no jobs and no logs; GitHub only surfaces the reason as a run annotation, not through the API.

Policy is now selected:

{"github_owned_allowed": true, "verified_allowed": false,
 "patterns_allowed": ["goreleaser/goreleaser-action@*"]}

GitHub-owned actions plus goreleaser, everything else still blocked. The SHA-pinned refs still match that pattern.

sha_pinning_required gets enabled after this merges — turning it on while the workflow still used tags would break pushes the same way.

Verification

  • actionlint exit 0
  • Workflow YAML parses
  • 8/8 uses: lines resolve to 40-char SHAs

Full path still needs a tag push. Immutability remains off until that passes.

🤖 Generated with Claude Code

Tags are mutable. actions/checkout@v4 resolves to whatever the v4 tag
points at today, so a compromised or repointed tag changes what runs in
a workflow that signs and publishes release artifacts.

Pin all four actions to full commit SHAs with the version in a trailing
comment, so sha_pinning_required can be turned on for the repository.
Same guarantee the immutable releases work applies to the outputs,
applied to the build inputs.

  actions/checkout                11d5960 (v4)
  actions/setup-go                40f1582 (v5)
  goreleaser/goreleaser-action    e435ccd (v6)
  actions/attest-build-provenance e8998f9 (v2)
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

Next review available in: 50 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: c8edf133-9325-4a0b-827d-7a0cf95e5ec0

📥 Commits

Reviewing files that changed from the base of the PR and between a39b501 and ef1e6c5.

📒 Files selected for processing (1)
  • .github/workflows/ci.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.

@muneebs
muneebs merged commit adbdd67 into main Aug 2, 2026
8 checks passed
@muneebs
muneebs deleted the ci/pin-actions-to-sha branch August 2, 2026 23:08
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.

1 participant