ci: harden GitHub Actions workflows and add zizmor scan - #2374
Merged
Conversation
Add a CI job that runs the zizmor static analyzer over the workflow files under .github/ to audit for supply-chain and privilege-escalation weaknesses (unpinned actions, credential persistence, template injection, and overly broad GITHUB_TOKEN permissions). Also apply the corresponding hardening to existing workflows: - add persist-credentials: false to all actions/checkout steps - narrow top-level `permissions: read-all` to `contents: read` - move github.event.inputs.tag into an env var in backfill-docs to avoid template injection in a run block - fix a malformed version-pin comment for mshick/add-pr-comment - add a 7-day cooldown to dependabot updates
antonwolfy
requested review from
ndgrigorian and
vlad-perevezentsev
as code owners
September 2, 2026 17:22
antonwolfy
marked this pull request as draft
September 2, 2026 17:22
|
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Collaborator
antonwolfy
marked this pull request as ready for review
September 3, 2026 10:18
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.
Adds a CI job that runs the zizmor static analyzer over the workflow files under
.github/.zizmoraudits GitHub Actions workflows for supply-chain and privilege-escalation weaknesses — unpinned action references, credential persistence through the checkout token, template injection via${{ ... }}expansion inrun:blocks, and overly broadGITHUB_TOKENpermissions.Alongside the new scan, this applies the corresponding hardening to the existing workflows so they pass the audit:
persist-credentials: falseto everyactions/checkoutstep that lacked itpermissions: read-alltopermissions: contents: readgithub.event.inputs.taginto anenv:var inbackfill-docs.ymlto avoid template injection in arun:blockmshick/add-pr-comment(# v3.12.0.8.3.12.0-># v3.12.0)cooldownto the dependabot update entriesThis is a CI/configuration-only change; no library code, tests, or documentation are affected.