Pin the remaining actions and scope job permissions - #164
Conversation
|
Warning Review limit reached
Next review available in: 54 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 (1)
WalkthroughThe workflows now use explicit read-only or write permissions where required. GitHub Actions references are pinned to commit SHAs. Checkout steps disable persisted credentials across benchmark and release jobs. ChangesWorkflow hardening
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release.yml:
- Around line 50-52: Add use-cache: false to the mlugg/setup-zig step’s with
configuration in the release workflow, while preserving the existing Zig version
and trusted tarball cache behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5cc340f1-f66f-40c2-be9d-853e20e90f1d
📒 Files selected for processing (3)
.github/workflows/benchmark.yml.github/workflows/ci.yml.github/workflows/release.yml
|
Valid, and applied to the release job only. Checked the action's own That distinction is what makes it worth doing here: those directories are restored from the GitHub Actions cache, and other workflow runs in this repository can write to that cache. A published binary should not be able to pick up compilation output that something other than its own run produced. The cost is a full rebuild per release, which is the right trade for an artifact people download. Scoped to Worth noting the limit of this change: it does not make the release build reproducible, and it does not verify the toolchain itself. |
Summary
Pins the eight action references that were still mutable tags, scopes
permissionson all six jobs, and stops every checkout persisting the job token.Why now
#162 added Dependabot and fixed the unverified Zig toolchain download in
ci.yml, but onlyci.ymlhad its actions pinned.benchmark.ymlandrelease.ymlwere untouched and still carried bare tags. The Dependabot run that followed made that visible: it bumped the pinned refs inci.ymlto new commit SHAs while the others simply moved from@v4to@v7, still mutable.The release path is the part that matters.
docker/login-actionauthenticates to ghcr.io anddocker/build-push-actionpushes the published image, and both were reached through tags their owners can move at any time.softprops/action-gh-releasecreates the release itself.Permissions
Assigned per job rather than blanket
contents: read, because two jobs genuinely need write and a uniform rule would have broken the release:ci: build,ci: integration,benchmark,release: buildcontents: readrelease: dockercontents: read,packages: writeghcr.io/${{ github.repository }}release: releasecontents: writeEvery job previously ran with the default token scope.
Audit after the change
permissionspersist-credentials: falseTest plan
actions/checkoutv7.0.1,download-artifactv8.0.1,upload-artifactv7.0.1,docker/build-push-actionv7.3.0,docker/login-actionv4.6.0,docker/metadata-actionv6.2.0,mlugg/setup-zigv2.2.1,softprops/action-gh-releasev3.0.2The release and docker jobs only run on tag pushes, so this PR's CI does not exercise them. Their permission scopes are the one part that will not be proven until the next release, which is worth knowing before cutting one.
Summary by CodeRabbit