Repository navigation
docs(site): keep the checkout token out of the CI recipes - #560
Merged
Merged
Conversation
Both GitHub Actions recipes on /install left actions/checkout's token in the workspace, and the code scanning one granted security-events: write to every job. Each checkout now sets persist-credentials: false, and the write permission sits on the job that uploads the SARIF.
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.
Problem
The two GitHub Actions recipes on
/installleftactions/checkout's token in the workspace, and the code scanning recipe grantedsecurity-events: writeto every job in the workflow. Anyone copying them got broader access than the job needs.Change
persist-credentials: false.security-events: writemoves from the workflow to the job that uploads the SARIF; the workflow keepscontents: read.Verification
bun run check:site: passes (251 pages, SEO and crawler checks).bun run site:check: exit 0.actionlint -onelineclean;zizmor --offlineno longer reportsartipacked. The remainingunpinned-usesfindings are kept on purpose: version tags stay readable in a copy-paste recipe.