Skip to content

ci(review): explicit caller-job permissions on the Claude review caller - #580

Merged
heskew merged 1 commit into
mainfrom
ci/claude-caller-permissions
Jul 20, 2026
Merged

ci(review): explicit caller-job permissions on the Claude review caller#580
heskew merged 1 commit into
mainfrom
ci/claude-caller-permissions

Conversation

@heskew

@heskew heskew commented Jul 14, 2026

Copy link
Copy Markdown
Member

One block: grant contents: read + pull-requests: write + id-token: write on the review calling job in claude-review.yml — the union of what the reusable's authorize and review jobs declare, matching gemini-review.yml in 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

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>
@heskew
heskew requested review from a team as code owners July 14, 2026 14:41
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@kriszyp kriszyp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 Ethan-Arrowood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM — byte-identical to the sibling harper#1790. Approving.

sent with Claude Opus 4.8

@heskew
heskew merged commit 767b373 into main Jul 20, 2026
30 of 31 checks passed
@heskew
heskew deleted the ci/claude-caller-permissions branch July 20, 2026 13: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.

3 participants