Skip to content

ci: least-privilege permissions on test workflow (token read-only prep)#1

Open
bryan-minimal wants to merge 1 commit into
mainfrom
harden/actions-token-permissions
Open

ci: least-privilege permissions on test workflow (token read-only prep)#1
bryan-minimal wants to merge 1 commit into
mainfrom
harden/actions-token-permissions

Conversation

@bryan-minimal

Copy link
Copy Markdown
Member

Why

The gominimal org is flipping the default GITHUB_TOKEN to read-only. To make that flip a no-op, every workflow needs an explicit least-privilege permissions: block. This adds one to the Test workflow.

What

Adds a top-level block:

permissions:
  contents: read

Why contents: read is the right (and minimal) grant

test.yml only:

  • checks out the repo (actions/checkout — needs contents: read), and
  • exercises the local composite action via uses: ./ (fetches the mip binary over HTTPS, runs the hello-world task, and checks the version output).

It performs no writes with the repo GITHUB_TOKEN (no pushes, no releases, no PR/issue/comment API calls, no packages). So contents: read is the verified least-privilege block.

Impact

  • Clears the karkinos github/actions-missing-permissions finding for this repo.
  • De-risks the org-wide default-token flip tracked in gominimal/inbox#273 by making the read-only default a no-op here.

Prep for the org default GITHUB_TOKEN flip to read-only: add an explicit
top-level `permissions:` block so the flip is a no-op for this workflow.
The workflow only checks out the repo and tests the local action (uses: ./)
and performs no writes with the token, so `contents: read` is the safe
least-privilege grant.

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

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

Run ID: e1e74322-5040-4009-960b-f657ca241a13

📥 Commits

Reviewing files that changed from the base of the PR and between a5ed123 and bab140f.

📒 Files selected for processing (1)
  • .github/workflows/test.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch harden/actions-token-permissions

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

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