Add zizmor GitHub Actions security scan to CI - #1094
Merged
Conversation
Fix a template-injection risk in autogen-docs-notify.yml by moving workflow_dispatch/workflow_run inputs into env vars instead of interpolating them directly into a shell script. Disable credential persistence on checkouts that don't push commits afterward, and add a persist-credentials passthrough input to the shared setup action. Suppress the two checkouts that legitimately need to keep credentials for a later git push, and the workflow_run trigger that is deliberate and already documented, with inline zizmor: ignore comments explaining why.
Runs zizmor against .github/workflows on push to main and on every PR, mirroring the setup already used in stacklok/infra, so future workflow changes get flagged automatically instead of relying on a manual local run.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
danbarr
enabled auto-merge (squash)
August 10, 2026 18:09
Contributor
There was a problem hiding this comment.
Pull request overview
Adds automated GitHub Actions security auditing to this docs site’s CI via zizmor, and hardens existing workflows/composite actions based on zizmor findings (credential persistence and template-injection).
Changes:
- Introduce a
zizmorworkflow to scan.github/workflows/on PRs and pushes tomain. - Reduce credential persistence in workflows/composite action checkouts where no
git pushoccurs. - Harden
autogen-docs-notify.ymlby moving workflow-provided values intoenvbefore shell use, and document/suppress deliberateworkflow_runusage.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/zizmor.yaml |
New CI job to run zizmor against repository workflows. |
.github/workflows/upstream-release-docs.yml |
Adds inline zizmor suppressions and documents checkouts that intentionally retain credentials for git push. |
.github/workflows/claude.yml |
Disables credential persistence on checkout and via the shared setup composite. |
.github/workflows/autogen-docs-notify.yml |
Documents deliberate workflow_run trigger and removes template-injection risk by using env. |
.github/workflows/_static-checks.yaml |
Disables credential persistence on checkout and via the shared setup composite. |
.github/actions/setup/action.yaml |
Adds a persist-credentials passthrough input for actions/checkout in the shared setup action. |
Suppressed comments (1)
.github/workflows/upstream-release-docs.yml:301
- This checkout is documented as requiring persisted credentials, but it relies on
actions/checkout's default instead of setting it explicitly. Addingpersist-credentials: truemakes the intent match the comment and avoids surprises if defaults change.
- name: Checkout PR branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with: # zizmor: ignore[artipacked]
ref: ${{ steps.eff.outputs.head_ref }}
fetch-depth: 0
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Default the shared setup action's persist-credentials input to false, since only the upstream-release-docs bootstrap step needs true, and make that and the other credential-retaining checkouts set persist-credentials explicitly rather than relying on actions/checkout's default.
ChrisJBurns
approved these changes
Aug 10, 2026
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.
Description
Ran zizmor (a GitHub Actions security auditor) against this repo's workflows and fixed what it found:
autogen-docs-notify.yml, where a workflow input was interpolated directly into a shell script instead of passed throughenv.persist-credentials: false, including a new passthrough input on the shared./.github/actions/setupcomposite action.workflow_runtrigger inautogen-docs-notify.yml(deliberate and already documented in that file's security-model comment), are suppressed with inlinezizmor: ignorecomments explaining why.Also adds a
zizmor.yamlworkflow that runs zizmor on every push tomainand every PR, mirroring the setup already used instacklok/infra, so future workflow changes get flagged automatically instead of relying on someone running it locally.Type of change
Other (internal)