Skip to content

ci(release): drop workflow-level write permissions#431

Merged
haksungjang merged 1 commit into
mainfrom
ci/release-least-privilege
Jul 21, 2026
Merged

ci(release): drop workflow-level write permissions#431
haksungjang merged 1 commit into
mainfrom
ci/release-least-privilege

Conversation

@haksungjang

Copy link
Copy Markdown
Member

Summary

  • Default the release workflow to contents: read at the workflow level.
  • Grant contents: write only to the two jobs that need it: create-release (creates the draft release) and upload-assets (uploads release assets).
  • Remove the workflow-level packages: write grant: no job in this workflow pushes packages. release-gate already declares its own contents: write / packages: read block, and docs-walkthrough calls a reusable workflow that declares contents: read itself.

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

  • actionlint passes with no new findings (remaining shellcheck notes are pre-existing inline-script style issues untouched by this change).
  • Job-by-job audit: summary only writes to the step summary, docs-walkthrough inherits nothing beyond read, and the two elevated jobs match the exact API calls they make (release create/edit, asset upload).

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
haksungjang merged commit bad62de into main Jul 21, 2026
33 checks passed
@haksungjang
haksungjang deleted the ci/release-least-privilege branch July 21, 2026 05:23
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant