Repository navigation
Description
actions/checkout writes the job's GITHUB_TOKEN into .git/config by default, so any later step in that job, and anything it runs, can read a credential it was never handed. Suppressing it is one line, persist-credentials: false, and it is safe wherever no step needs git authentication.
Current state
.github/workflows/canonical-review-sweep.yml sets it, because a reviewer raised it there. Every other hub workflow calling actions/checkout does not:
build-docker-task.ymlbuild-release-task.ymlcheck-upstream-version-task.ymldeploy-site-task.ymlget-version-task.ymlpublish-docker-readme-task.ymlrun-codegen-pull-request-task.ymlvalidate-task.yml
Several run under callers granting contents: write, so the persisted token there is broader than the sweep job's issues: write.
Why this is filed rather than folded in
The pull request that raised it, #1649, is about the carried-content review sweep. Those eight files sit outside its diff, and GOVERNANCE.md "Verification Discipline" says a sibling that was wrong before the change and sits in a file the diff does not touch is filed rather than folded in, because every file a diff grows into is one more that each review round reads again.
What closing this looks like
Two parts, and the first decides the second.
- Decide whether
persist-credentials: falsebecomes a documented convention inGOVERNANCE.md"Workflow YAML Conventions" beside the action-pinning rule. It is a real hardening rather than a style preference, and today one workflow carries it while nine do not, which is the drift a rule stated nowhere produces. - Where a workflow does need the persisted credential, a push or a
git fetchof another ref being the cases, the flag stays off and the job says why inline, the way the concurrency exceptions already do.
The audit is per job rather than per file: a job that only reads the checked-out tree needs nothing, and actions/checkout still authenticates its own fetch through its token input regardless of this flag.
Activity
Retract the Same Overclaim on the Two Carried Surfaces That Kept It
Sweep the Carried-Content Read Weekly Instead of Gating Every Push (#…
Promote the Weekly Carried-Content Sweep to Main (#1654)
ptr727 commentedon Nov 1, 2026
Decision needed (decision triage, 2026-11-01)
Question: Should GOVERNANCE.md "Workflow YAML Conventions" (line 266) gain a rule that every
actions/checkoutstep setspersist-credentials: false, with a job needing the persisted token keeping it and saying why inline?Options, recommended first:
contents: writejob can read the token from.git/config. No work in flight.Evidence: Only canonical-review-sweep.yml:52 (#1649) and test-pull-request.yml:38 (31c4bbd, #2555) set it. Candidate exceptions: build-release-task.yml:424 (
git fetch), :448 (git ls-remote), check-upstream-version-task.yml:161 and run-codegen-pull-request-task.yml:74 (peter-evans/create-pull-request). merge-bot-task.yml pushes withoutactions/checkout.Blocks: none
ptr727 commentedon Nov 1, 2026
Maintainer answer (decision triage, 2026-11-01): Option 1: add a GOVERNANCE.md 'Workflow YAML Conventions' rule that every actions/checkout step sets persist-credentials: false. A job that needs the persisted token keeps it and says why inline. Land it as its own governance PR plus the eight-file sweep. This is now work for the next burndown round.
ptr727 commentedon Nov 13, 2026
Backlog burndown claim (round 6, group 1, away mode): branch
burndown/checkout-persist-credentials.Issues: #1650, per the maintainer's recorded answer (option 1): a
GOVERNANCE.md"Workflow YAML Conventions" rule that everyactions/checkoutstep setspersist-credentials: false, a job needing the persisted token keeping it and saying why inline, landed with the workflow sweep.Predicted file set:
GOVERNANCE.md.github/workflows/build-docker-task.yml,.github/workflows/build-release-task.yml,.github/workflows/check-upstream-version-task.yml,.github/workflows/deploy-site-task.yml,.github/workflows/get-version-task.yml,.github/workflows/publish-docker-readme-task.yml,.github/workflows/run-codegen-pull-request-task.yml,.github/workflows/validate-task.yml,.github/workflows/test-pull-request.yml,.github/workflows/canonical-review-sweep.ymlcatalog/snippets/workflows/test-pull-request-smoke.ymldocs/reusable-workflows.mdRequire Checkout Steps Not to Persist Credentials (#4171)