ci: reduce workflow-level permissions to least privilege#1033
Merged
Conversation
semantic-release uses the GitHub App token for all write operations, so the workflow's default GITHUB_TOKEN only needs id-token (OIDC provenance), packages (GitHub Packages publish), and contents read (for the CI validation workflow to checkout the repository).
doistbot
reviewed
Apr 8, 2026
Member
doistbot
left a comment
There was a problem hiding this comment.
This PR improves security by reducing the release workflow's GITHUB_TOKEN permissions to the principle of least privilege. This update ensures safer automation and better maintainability now that write operations are handled by the GitHub App token. A minor note was raised regarding a copy-pasted comment that could be updated to better reflect its new context.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description
Reduces the release workflow's default
GITHUB_TOKENpermissions to the minimum required. Since semantic-release now uses the GitHub App token for all write operations (pushing commits, creating releases, commenting on issues/PRs), the workflow token only needsid-token: write(OIDC provenance),packages: write(GitHub Packages publish), andcontents: read(CI validation checkout).Backported from Doist/typist#1291 and Doist/typist#1292.
PR Checklist