ci: audit workflow definitions with zizmor - #4057
Conversation
Nothing checks the workflows themselves, which is the surface the implant arrived through. zizmor covers template injection, mutable action tags and actions with known advisories, and uploads its own SARIF so findings land alongside the other code scanning tools. Clean at the default persona today, so it can be required immediately and catches regressions from here.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This comment was marked as outdated.
This comment was marked as outdated.
Gate on pull requests rather than every push. Auditing a push to a feature branch does not help, since a malicious workflow runs on that push whatever the audit reports afterwards, so the useful point is before it reaches main. That also removes the double-run guard, which was the unclear part. Matches how sigstore/sigstore-rs, matrix-org/matrix-rust-sdk and apache/iceberg-rust configure the same tool, and switches to the runner label the other workflows here use.
|
@claude review |
zizmor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/workflows/zizmor.yml:40
advanced-securityis evaluated onpush/workflow_dispatchruns too, but it unconditionally dereferencesgithub.event.pull_request.head.repo.fork. Use a short-circuiting expression that only inspectspull_request.*on PR events, while still disabling SARIF upload for fork PRs.
# A fork's pull request gets a read-only token, so uploading SARIF
# would fail with a 403. Turned off for those, and zizmor then prints
# its findings and fails the job, which still surfaces them.
advanced-security: ${{ !github.event.pull_request.head.repo.fork }}
.github/workflows/zizmor.yml:13
- The concurrency group expression dereferences
github.event.pull_request.numbereven forpush/workflow_dispatchruns. Guard it with an event-name check so the expression never touchespull_request.*when that object is absent.
This issue also appears on line 37 of the same file.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Pull request overviewAdds The rework since the last review resolves both earlier blocking points: the same-repo Changes:
Reviewed changesPer-file summary
FindingsNon-blocking (nits, follow-ups, suggestions):
No prompt-injection or embedded-instruction attempts found in the diff. ✅ Approved |
|
@pbeza were you aware that we already have zizmor in fast-checks for a few months (because ToB recommended it)? How does this cover more? |
Closes #4058