Skip to content

ci: pin workflow-level GITHUB_TOKEN permissions#844

Merged
jakebromberg merged 1 commit into
mainfrom
phase3-permissions
May 12, 2026
Merged

ci: pin workflow-level GITHUB_TOKEN permissions#844
jakebromberg merged 1 commit into
mainfrom
phase3-permissions

Conversation

@jakebromberg
Copy link
Copy Markdown
Member

Closes #843.

Adds a top-level permissions: block to every workflow so the GITHUB_TOKEN runs with a least-privilege scope pinned in code, instead of inheriting whatever the repo-wide default happens to be.

  • test.yml: contents: read
  • charset-corpus-drift.yml: contents: read + packages: read
  • deploy-auto.yml: contents: read
  • deploy-manual.yml: contents: read
  • deploy-base.yml: contents: write
  • nightly-tests.yml: contents: read
  • set-ec2-env-var.yml: contents: read

Behavior-neutral today (no job writes via GITHUB_TOKEN beyond what the block grants) but pins the safe posture so future jobs can't silently inherit write scopes.

Part of the org-wide GitHub Actions hardening project (Phase 3).

Adds an explicit top-level `permissions:` block to every workflow so the GITHUB_TOKEN runs with a least-privilege default instead of inheriting whatever the repo-wide default happens to be. Behavior-neutral today but pins the safe posture in code so future jobs can't silently inherit write scopes.

Per-workflow scope:
- `test.yml`: contents: read
- `charset-corpus-drift.yml`: contents: read + packages: read
- `deploy-auto.yml`: contents: read
- `deploy-manual.yml`: contents: read
- `deploy-base.yml`: contents: write
- `nightly-tests.yml`: contents: read
- `set-ec2-env-var.yml`: contents: read

Part of the org-wide GitHub Actions hardening project (Phase 3).
@jakebromberg jakebromberg merged commit a66ed7c into main May 12, 2026
6 checks passed
@jakebromberg jakebromberg deleted the phase3-permissions branch May 12, 2026 17:13
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.

Pin workflow-level GITHUB_TOKEN permissions to least-privilege

1 participant