ci(review): explicit caller-job permissions on the Claude review caller - #580
Merged
Conversation
Grant contents:read + pull-requests:write + id-token:write at the calling-job level (union of the reusable's per-job declarations), matching gemini-review.yml in this repo and oauth's claude caller. Without the block the grants come from the repo's default-workflow-permissions setting — GitHub silently intersects the reusable's requests with that ceiling, so pull-requests:write survives only while the repo default is "write". Surfaced by review feedback on rocksdb-js#701; pattern documented upstream in ai-review-prompts#74. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
kriszyp
approved these changes
Jul 14, 2026
kriszyp
left a comment
Member
There was a problem hiding this comment.
Twin of harper#1790 — correct least-privilege caller-job permissions matching gemini-review.yml; the only red check is the expected anti-tamper guard. Approving.
🤖 Reviewed with KrAIs (Claude Opus 4.8)
Ethan-Arrowood
approved these changes
Jul 14, 2026
Ethan-Arrowood
left a comment
Member
There was a problem hiding this comment.
LGTM — byte-identical to the sibling harper#1790. Approving.
sent with Claude Opus 4.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One block: grant
contents: read+pull-requests: write+id-token: writeon thereviewcalling job inclaude-review.yml— the union of what the reusable'sauthorizeandreviewjobs declare, matchinggemini-review.ymlin this repo and oauth's claude caller. Companion to HarperFast/harper#1790 (same change there).Why
Without an explicit block the caller inherits the repo's default-workflow-permissions setting: GitHub silently intersects the reusable's per-job requests with that ceiling. Reviews work today only because the repo default is "write"; flipping that setting to "read" would break review posting with unhelpful 403s. Explicit job-level grants remove the hidden dependency.
Cross-references
Note: this PR edits the caller workflow, so its own Claude review check fails with the expected anti-tamper guard; clears on merge.
🤖 Generated with Claude Code