ci: harden GitHub Actions workflows and add zizmor scan - #267
Merged
Conversation
Add a CI job that runs the zizmor static analyzer over the workflow files under .github/, and apply the corresponding hardening so the existing workflows pass the audit: - add persist-credentials: false to every actions/checkout step that lacked it, so the checkout token is not left in the runner's git config for later steps to reuse - narrow top-level permissions: read-all to permissions: contents: read - add a 7-day cooldown to the dependabot update entries CI/configuration-only; no library code, tests, or docs are affected.
antonwolfy
requested review from
jharlow-intel,
ndgrigorian,
vlad-perevezentsev and
xaleryb
as code owners
September 3, 2026 10:19
antonwolfy
added a commit
that referenced
this pull request
Sep 3, 2026
antonwolfy
force-pushed
the
ci/harden-workflows-zizmor
branch
from
September 3, 2026 10:21
36e487d to
0acc209
Compare
vlad-perevezentsev
approved these changes
Sep 3, 2026
vlad-perevezentsev
left a comment
Collaborator
There was a problem hiding this comment.
LGTM
Thank you @antonwolfy
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.
Summary
Adds a CI job that runs the zizmor static analyzer over the workflow files under
.github/, and applies the corresponding hardening so the existing workflows pass the audit.zizmoraudits GitHub Actions workflows for supply-chain and privilege-escalation weaknesses — credential persistence through the checkout token, overly broadGITHUB_TOKENpermissions, template injection via${{ ... }}expansion inrun:blocks, and unpinned action references.Changes
.github/workflows/zizmor.yml— runs the zizmor scan on push tomainand on pull requests. Top-levelpermissions: {}, job-levelcontents: read,min-severity: mediumso informational template-injection notes on internally-defined values annotate without gating CI.persist-credentials: falseadded to everyactions/checkoutstep that lacked it, so the checkout token is not left in the runner's git config for later steps to reuse.permissions: read-alltopermissions: contents: readin every workflow that used the broad default.cooldownadded to bothdependabot.ymlupdate entries.This is a CI/configuration-only change; no library code, tests, or documentation are affected.