Skip to content

Disable git credential persistence on checkouts - #754

Merged
bschwedler merged 1 commit into
ci/add-zizmor-pre-commitfrom
fix/artipacked-persist-credentials
Aug 17, 2026
Merged

Disable git credential persistence on checkouts#754
bschwedler merged 1 commit into
ci/add-zizmor-pre-commitfrom
fix/artipacked-persist-credentials

Conversation

@bschwedler

Copy link
Copy Markdown
Contributor

Sets persist-credentials: false on the checkouts whose jobs run no authenticated git operation afterward, so the checkout token isn't persisted where later steps don't need it. The two checkouts that do push (product-release, docs) keep it and remain the only artipacked exemptions.

@github-actions

Copy link
Copy Markdown

Test Results

2 187 tests  ±0   2 187 ✅ ±0   8m 3s ⏱️ -40s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit f9a516e. ± Comparison against base commit 9b60318.

Fourteen actions/checkout steps across the shared reusable
workflows relied on the default persist-credentials: true, which
writes the job token into the workspace .git/config. zizmor's
artipacked audit flags this as a credential-exfiltration risk:
if a later step uploads the workspace (including .git) as an
artifact, the token leaks into a downloadable, retained location.

None of these jobs run an authenticated git operation after
checkout -- registry logins carry their own credentials, bakery
reads the workspace read-only, and gh release / gh pr use the
GH_TOKEN env var rather than git config. Setting
persist-credentials: false therefore removes the token with no
behavior change and resolves the finding at its source instead
of suppressing it.

The two checkouts that genuinely need the persisted credential --
product-release (git push and PR creation with an App token) and
docs (gh-pages publish) -- keep their exemptions, now the only
entries in the artipacked ignore list. Neither uploads .git as an
artifact, so no leak path remains. This also drops the stale
bakery-build-native.yml line-number exemptions, letting the
zizmor pre-commit hook report no findings.
@bschwedler
bschwedler force-pushed the fix/artipacked-persist-credentials branch from f9a516e to d992faa Compare August 17, 2026 20:14
@bschwedler
bschwedler merged commit b59bd1a into ci/add-zizmor-pre-commit Aug 17, 2026
15 checks passed
@bschwedler
bschwedler deleted the fix/artipacked-persist-credentials branch August 17, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant