ci: declare least-privilege GITHUB_TOKEN scope on server and www - #30
Open
z33b0t wants to merge 1 commit into
Open
ci: declare least-privilege GITHUB_TOKEN scope on server and www#30z33b0t wants to merge 1 commit into
z33b0t wants to merge 1 commit into
Conversation
Neither workflow declared a `permissions:` block, so GITHUB_TOKEN was issued with the repository default scope. Both only ever check out — the www deploy authenticates to Cloudflare with its own API token — so `contents: read` is what they need, and stating it means a later change to the repository default can't silently widen them. mac.yml and windows.yml already declare `contents: write` at job level for `gh release create` / `upload`, so they are left alone. Clears CodeQL actions/missing-workflow-permissions alerts #1 and #2. Closes #15
Contributor
Author
|
@z33b0t ready to merge. All 9 checks green: CodeQL The CodeQL |
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.
server.ymlandwww.ymldeclared nopermissions:block, soGITHUB_TOKENwas issued with the repository default scope. Both only check out — the www deploy authenticates to Cloudflare with its own API token — socontents: readis the whole requirement.This clears CodeQL
actions/missing-workflow-permissionsalert #1 and alert #2.One correction to the issue: it says none of the four workflows declare a block.
mac.yml:31andwindows.yml:31already declarecontents: writeat job level (which is narrower than a top-level block, since it doesn't extend to any job added later). They're left as they are, so this PR is the remaining half.Closes #15