Skip to content

Commit b9110c9

Browse files
Set empty top-level permissions in claude-review (#1864)
### What Add `permissions: {}` at the workflow top level in `.github/workflows/claude-review.yml`, after the `concurrency` block and before `jobs`. ### Why Without an explicit top-level `permissions` block, jobs inherit whatever default `GITHUB_TOKEN` permissions the repository or organization grants. Setting `permissions: {}` at the workflow level enforces zero default permissions and forces every job to opt in to the exact scopes it needs (the `review` job already declares its own `contents: read`, `pull-requests: write`, `id-token: write`). This is the GitHub-recommended least-privilege hardening pattern and prevents future jobs added to this file from silently inheriting broad token scopes.
1 parent e1bf74b commit b9110c9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/claude-review.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ concurrency:
77
group: claude-review-${{ github.event.pull_request.number }}
88
cancel-in-progress: true
99

10+
permissions: {}
11+
1012
jobs:
1113
review:
1214
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.fork == false

0 commit comments

Comments
 (0)