Repository navigation
ci(release): grant permissions per job and pass the branch through env - #17
Merged
Merged
Conversation
The three fixes zizmor asked for: contents: write only on the job that pushes, the branch name through the environment rather than pasted into the script, and the App token minted with permission-contents: write. Co-authored-by: Yvette Mankerian <yvettekm@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the release workflow’s permission and shell-handling changes.
No open issues 🎉
What changed in this PR
Hardens the release workflow’s permissions and shell handling while preserving the existing release process.
Changes:
- Moves
contents: writefrom workflow-wide permissions to the release job. - Explicitly limits the GitHub App token to
contents: write. - Passes the branch name through an environment variable instead of interpolating it directly into the shell script.
| File | Description |
|---|---|
.github/workflows/release.yml |
Narrows permission grants and safely passes the branch name to git push. |
Review effort: Balanced
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.
The two workflow weaknesses zizmor found in every release.yml, as already fixed in the engine:
permissions: {}at workflow level withcontents: writeon the job that pushes; the branch name throughenv:;permission-contents: writeon the App token. zizmor reports nothing left in this file; actionlint passes. No behaviour change.🤖 Generated with Claude Code