Repository navigation
ci(release): grant permissions per job and pass the branch through env - #38
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
No active review issues are reported for the release-workflow hardening changes.
No open issues 🎉
What changed in this PR
This PR hardens the release workflow by limiting token permissions and passing the branch name safely into the shell, without changing the intended release process.
Changes:
- Replace workflow-wide write permissions with explicit per-job permissions.
- Restrict the GitHub App token to repository contents write access.
- Pass the branch name through an environment variable instead of interpolating it into the shell script.
| File | Description |
|---|---|
.github/workflows/release.yml |
Scope release permissions and safely pass 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