Skip to content

Scope CI token to read-only (least privilege) - #72

Merged
nicglazkov merged 1 commit into
mainfrom
ci/least-privilege-token
Jul 22, 2026
Merged

Scope CI token to read-only (least privilege)#72
nicglazkov merged 1 commit into
mainfrom
ci/least-privilege-token

Conversation

@nicglazkov

Copy link
Copy Markdown
Owner

CI (ci.yml) had no top-level permissions: block, so it ran with the repository default GITHUB_TOKEN scope. It only checks out the repo and runs tests, so read-only is enough. Adds permissions: contents: read, matching the scoping already in release.yml and canary.yml.

Surfaced by a pre-unattended security audit. Zero behavior change.

CI only checks out the repo and runs tests, so it does not need a
write-scoped GITHUB_TOKEN. Adds an explicit least-privilege permissions
block (release.yml and canary.yml already scope theirs).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014xbfpFLSceHGbpCVz2qBGG
@nicglazkov
nicglazkov merged commit c26cfb8 into main Jul 22, 2026
3 checks passed
@nicglazkov
nicglazkov deleted the ci/least-privilege-token branch July 22, 2026 22:19
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