ci: harden GitHub Actions workflows and add zizmor scan - #169
Open
antonwolfy wants to merge 2 commits into
Open
Conversation
Backport of IntelPython/dpctl#2374. - Narrow top-level `permissions: read-all` to `contents: read`. - Add `persist-credentials: false` to all actions/checkout steps. - Add a 7-day cooldown to the dependabot update entries. - Add a zizmor workflow that scans .github/ for supply-chain and privilege-escalation issues in GitHub Actions workflows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
antonwolfy
requested review from
jharlow-intel,
ndgrigorian,
vlad-perevezentsev and
xaleryb
as code owners
September 3, 2026 10:47
zizmor's stale-action-refs audit flagged the styfle/cancel-workflow-action pins: the SHA is correct, but its tag is `0.13.1` (no `v` prefix), so the `# v0.13.1` comment resolved to an unknown ref. Drop the `v` to match the actual tag and let the zizmor scan pass.
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.
Backport of IntelPython/dpctl#2374 to
mkl_random.Introduces a CI job that runs the zizmor static analyzer over the workflow files in
.github/, and applies the hardening zizmor recommends across the existing workflows.Changes
permissions: read-allwith a scopedpermissions:\n contents: readinbuild-docs.yml,build-with-clang.yml,build-with-standard-clang.yml,build_pip.yml,conda-package.yml,conda-package-cf.yml,pre-commit.yml, andopenssf-scorecard.yml. Job-level permission blocks are left intact.persist-credentials: falseto everyactions/checkoutstep that lacked it, preventing the checkout token from lingering in the local git config.cooldownto both thegithub-actionsandpre-commitupdate entries.zizmor.ymlworkflow — runs the zizmor scanner on pushes tomasterand on pull requests, with empty top-level permissions and a scopedcontents: readjob permission.min-severity: medium, so low/informational template-injection notes from internally-defined values are surfaced as annotations but do not gate CI.Notes
The template-injection fix and the
mshick/add-pr-commentversion-comment fix from the upstream PR are not applicable here:mkl_randomhas no workflow interpolating user-controllable dispatch inputs into arun:block, and it does not usemshick/add-pr-comment.CI/configuration-only change; no library code, tests, or documentation are affected.