Skip to content

ci: enforce least-privilege GITHUB_TOKEN permissions#201

Merged
atimin merged 1 commit into
mainfrom
200-least-privilege-github-token
May 1, 2026
Merged

ci: enforce least-privilege GITHUB_TOKEN permissions#201
atimin merged 1 commit into
mainfrom
200-least-privilege-github-token

Conversation

@mother-6000
Copy link
Copy Markdown
Contributor

Closes #200

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • CHANGELOG.md has been updated (for bug fixes / features / docs)

What kind of change does this PR introduce?

CI hardening / security improvement

What was changed?

  • Set workflow-level default token permissions to read-all in .github/workflows/ci.yml
  • Added explicit job-level permissions for privileged jobs only:
    • deploy: contents: read, packages: write (for GHCR publish)
    • make_release: contents: write (for GitHub Release creation/upload)
  • Left format/test/e2e jobs on read-only defaults

Plan reference: #200 (comment)

Related issues

Does this PR introduce a breaking change?

No.

Other information:

Validation run locally:

  • npm run fmt:check
  • npm run typecheck
  • npm run test:ci

@atimin atimin merged commit 4b86a12 into main May 1, 2026
6 checks passed
@atimin atimin deleted the 200-least-privilege-github-token branch May 1, 2026 16:00
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.

Least-privilege GITHUB_TOKEN permissions

2 participants