Skip to content

chore(ci): add explicit GITHUB_TOKEN permissions to workflows#132

Merged
ilhan007 merged 1 commit into
mainfrom
chore/workflow-permissions
May 15, 2026
Merged

chore(ci): add explicit GITHUB_TOKEN permissions to workflows#132
ilhan007 merged 1 commit into
mainfrom
chore/workflow-permissions

Conversation

@ilhan007
Copy link
Copy Markdown
Contributor

Summary

Add explicit top-level permissions: blocks to all GitHub Actions workflows to follow the principle of least privilege. This prepares the repository for the upcoming enforcement of read-only GITHUB_TOKEN by default across GitHub organizations.

Permissions Applied

Workflow Permission Reason
ci.yml contents: read Only checks out code and runs build — no write access needed
lint.yml contents: read Only checks out code and runs linting — no write access needed
deploy.yml contents: write Uses JamesIves/github-pages-deploy-action which pushes build artifacts to the gh-pages branch

Context

GitHub is rolling out read-only GITHUB_TOKEN as the default for new repositories and will enforce it more broadly. By declaring permissions explicitly now, we:

  1. Avoid unexpected breakage when the default changes
  2. Follow security best practices (principle of least privilege)
  3. Make the required access for each workflow transparent to reviewers

Add top-level `permissions:` blocks to all workflows to follow the
principle of least privilege and prepare for the upcoming default
read-only GITHUB_TOKEN enforcement.
@ilhan007 ilhan007 merged commit ff464be into main May 15, 2026
3 checks passed
@ilhan007 ilhan007 deleted the chore/workflow-permissions branch May 15, 2026 06:40
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