Repository navigation
ci: limit the release draft token to contents and pull requests - #338
Merged
Merged
Conversation
The token Release – Draft creates carried every permission the GitHub App's installation has. It now asks for only what opening the release pull request needs: write access to contents and to pull requests. The create-pull-request step is the token's only user, and the release pull request changes no workflow files, so it needs no workflows permission. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
nickolas-dimitrakas
approved these changes
Nov 4, 2026
nickolas-dimitrakas
left a comment
Contributor
There was a problem hiding this comment.
Narrowing the Release – Draft token to contents:write and pull-requests:write covers push + PR creation; no workflows permission needed. Checks green. Watch the next Release – Draft run for the Generate a token step.
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.
Why
The release automation creates a short-lived token from the release GitHub App to open each release pull request. That token carried every permission the App has, which is more than opening a pull request needs. After this lands, the token has only two: write access to this repository's contents and to its pull requests.
Programme
Standalone change, no programme.
What changes
Before: the token step in Release – Draft asked for no specific permissions, so the token received all of the App installation's permissions. After: it asks for
contents: writeandpull-requests: writeonly. The pull request step is the token's only user, and the release pull request changes no workflow files, so noworkflowspermission is needed.No changelog entry or documentation change, because nothing in the published package or the release steps changes.
Linked work
Unblocks: the same change for
maintenance/5.x, planned as its own pull request.Related: #336 and #337, which moved the App's credentials into the
releaseenvironment onmainandmaintenance/5.x.Rollout
Path: CI only; nothing is published. The change takes effect on the next Release – Draft run from
main.Feature flags: none.
Turning it off: revert this pull request, which takes minutes and leaves nothing behind.
What we watch: the next Release – Draft run on
mainopens its release pull request. A failure at the "Generate a token" step means the App installation lacks one of the two permissions.Risks
Risk class: low.
Who
Written by: an automated coding agent (Claude Code), at an engineer's request.
Code reviewed before opening: an independent review agent reviewed the commit on 4 November 2026 and found no blocking issues; no person has reviewed it yet.
Design reviewed before opening: no one.
Decision this implements: an engineer's request on 4 November 2026 to limit the release token's permissions; internal, cannot be linked.
Checked: on 4 November 2026, before opening: the repository's lint checks passed on the changed file, the workflow parses, and both input names exist in the pinned version of the token action.
Not checked: a Release – Draft run with the narrowed token, which would open a real release pull request; the next release checks it.
Size
Hand-written: 2 lines added in 1 file.
Generated: none.
🤖 Generated with Claude Code