Skip to content

Commit b8df748

Browse files
committed
ci: explicit least-privilege GITHUB_TOKEN permissions (CodeRabbit on PR #19)
Adds workflow-level `permissions: contents: read` so a compromised action step in any matrix cell can't write back to the repo. None of the jobs (unittest, typecheck, secret-scan) need write access — no commits, PR comments, or release publishes. Read-only is enough.
1 parent cc0e9a1 commit b8df748

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
branches: [master]
66
pull_request:
77

8+
# Least-privilege GITHUB_TOKEN scope. None of these jobs need write access
9+
# (no commit, no PR comment, no release publish) — read-only is enough.
10+
# A compromised action in any matrix cell can't write back to the repo.
11+
permissions:
12+
contents: read
13+
814
concurrency:
915
group: ${{ github.workflow }}-${{ github.ref }}
1016
cancel-in-progress: true

0 commit comments

Comments
 (0)