Repository navigation
ci: drop top-level contents write from smoke workflows - #95
Merged
Merged
Conversation
Scorecard's TokenPermissions check scores 0 when any workflow grants a write permission at workflow scope. e2e-smoke and published-tag-smoke only need contents: write inside their single job (scratch-branch push plus the commit the action under test creates), so restrict the default token to none and declare the write on the job, matching the codeql/scorecard/sync-issues layout. Closes code-scanning alerts #27 and #23. Refs: #94
Contributor
Author
|
Verification results:
|
This was referenced Jul 15, 2026
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.
What
Restrict the default
GITHUB_TOKENto none at workflow scope ine2e-smoke.ymlandpublished-tag-smoke.yml, declaringcontents: writeon the single job instead (needed for the scratch-branch push and the commit the action under test creates via the API). Same layout ascodeql.yml/scorecard.yml/sync-issues.yml.Why
Scorecard's TokenPermissions check scores 0 whenever any workflow grants a write permission at workflow scope — these two were the only remaining top-level writes. Fixing them closes code-scanning alerts #27 and #23 and lifts the check score off zero. The remaining job-level write alerts in the release pipeline are tracked separately (out of scope here; several of those files are devkit-managed).
Verification
prek run --all-files).actionlintclean for this diff (the twosteps.commit.outputswarnings it reports are pre-existing ondev, unrelated).e2e-smokeruns on this PR (pull_request → dev) — exercises the job-level token end-to-end.published-tag-smoketo be dispatched on this branch withref=v0.3.0after the PR opens.Refs: #94