Skip to content

ci: least-privilege permissions blocks in workflows (OpenSSF Scorecard) - #322

Merged
ronaldtse merged 1 commit into
mainfrom
chore/scorecard-token-permissions
Nov 24, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
chore/scorecard-token-permissions

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

Remediates the OpenSSF Scorecard Token-Permissions findings (score 0 -> 10):

  • fuzz-smoke.yml, test.yml: declare explicit top-level permissions: contents: read (previously undeclared -> default token permissions).
  • map-artifact.yml, release.yml: top-level drops to contents: read; contents: write / id-token: write move to the single job that needs them (release attach / trusted publishing).

No behavioral change for read-only jobs; write grants now scoped to the publishing jobs only.

Test plan

  • YAML validated locally (top-level + job-level permission keys parse)
  • test.yml exercises the PR (parse jobs green)
  • release.yml / map-artifact.yml are tag/push-triggered; write paths unchanged at job level

Declare explicit top-level contents: read on every workflow; move
contents: write / id-token: write to the jobs that need them (release
publishing, artifact release upload). Clears the Token-Permissions
findings from OpenSSF Scorecard.
@ronaldtse
ronaldtse merged commit 1638570 into main Nov 24, 2026
13 checks passed
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