Skip to content

ci: add zizmor pre-commit hook - #732

Merged
bschwedler merged 5 commits into
mainfrom
ci/add-zizmor-pre-commit
Aug 17, 2026
Merged

ci: add zizmor pre-commit hook#732
bschwedler merged 5 commits into
mainfrom
ci/add-zizmor-pre-commit

Conversation

@ianpittwood

Copy link
Copy Markdown
Contributor

Summary

  • add zizmor to the pre-commit checks
  • scope GitHub App tokens and avoid expression interpolation in shell steps
  • baseline existing zizmor findings with location-specific exemptions

Testing

  • uvx pre-commit run --all-files
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown

Test Results

2 193 tests  ±0   2 193 ✅ ±0   7m 6s ⏱️ - 2m 22s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit b59bd1a. ± Comparison against base commit 0357ed6.

♻️ This comment has been updated with latest results.

@bschwedler
bschwedler added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
Resolve the setup-goss/action.yml conflict by taking main's
version. PR #731 refactored that action (pinned goss version plus
result caching) and in doing so already moved every inputs.*
reference into env: blocks, which supersedes this branch's
separate injection fix for setup-goss.
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.
…ials

Disable git credential persistence on checkouts
@bschwedler
bschwedler enabled auto-merge August 17, 2026 20:20
@bschwedler
bschwedler added this pull request to the merge queue Aug 17, 2026
Merged via the queue into main with commit dd9d958 Aug 17, 2026
25 checks passed
@bschwedler
bschwedler deleted the ci/add-zizmor-pre-commit branch August 17, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants