ci(release): drop workflow-level write permissions#431
Merged
Conversation
Scorecard flagged the release workflow for granting contents and packages write at the workflow level. Default to contents: read and elevate to contents: write only in the two jobs that create the draft release and upload its assets. No job pushes packages, so the packages: write grant is removed entirely; release-gate already declares its own contents: write / packages: read block.
haksungjang
added a commit
that referenced
this pull request
Jul 25, 2026
Scorecard flagged the release workflow for granting contents and packages write at the workflow level. Default to contents: read and elevate to contents: write only in the two jobs that create the draft release and upload its assets. No job pushes packages, so the packages: write grant is removed entirely; release-gate already declares its own contents: write / packages: read block.
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.
Summary
contents: readat the workflow level.contents: writeonly to the two jobs that need it:create-release(creates the draft release) andupload-assets(uploads release assets).packages: writegrant: no job in this workflow pushes packages.release-gatealready declares its owncontents: write/packages: readblock, anddocs-walkthroughcalls a reusable workflow that declarescontents: readitself.Why
OpenSSF Scorecard's Token-Permissions check scored 0 because the workflow granted write tokens to every job. Least-privilege tokens limit the blast radius if any job step is compromised.
Verification
actionlintpasses with no new findings (remaining shellcheck notes are pre-existing inline-script style issues untouched by this change).summaryonly writes to the step summary,docs-walkthroughinherits nothing beyond read, and the two elevated jobs match the exact API calls they make (release create/edit, asset upload).