Skip to content

docs(site): keep the checkout token out of the CI recipes - #560

Merged
cevdetch merged 1 commit into
mainfrom
docs/code-scanning-recipe
Nov 28, 2026
Merged

cevdetch merged 1 commit into
mainfrom
docs/code-scanning-recipe

Conversation

@cevdetch

Copy link
Copy Markdown
Owner

Problem

The two GitHub Actions recipes on /install left actions/checkout's token in the workspace, and the code scanning recipe granted security-events: write to every job in the workflow. Anyone copying them got broader access than the job needs.

Change

  • Each checkout sets persist-credentials: false.
  • In the code scanning recipe, security-events: write moves from the workflow to the job that uploads the SARIF; the workflow keeps contents: read.

Verification

  • bun run check:site: passes (251 pages, SEO and crawler checks).
  • bun run site:check: exit 0.
  • Both recipes extracted to workflow files: actionlint -oneline clean; zizmor --offline no longer reports artipacked. The remaining unpinned-uses findings are kept on purpose: version tags stay readable in a copy-paste recipe.

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.
@cevdetch
cevdetch merged commit 1ede3ac into main Nov 28, 2026
8 checks passed
@cevdetch
cevdetch deleted the docs/code-scanning-recipe branch November 28, 2026 20:41
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