Skip to content

ci: harden GitHub Actions workflows and add zizmor scan - #375

Merged
antonwolfy merged 1 commit into
masterfrom
backport-zizmor-ci-hardening
Sep 3, 2026
Merged

ci: harden GitHub Actions workflows and add zizmor scan#375
antonwolfy merged 1 commit into
masterfrom
backport-zizmor-ci-hardening

Conversation

@antonwolfy

Copy link
Copy Markdown
Collaborator

Backport of IntelPython/dpctl#2374, adapted to mkl_fft's own set of workflows.

Adds a CI job that runs the zizmor static analyzer over the workflow files under .github/. zizmor audits GitHub Actions workflows for supply-chain and privilege-escalation weaknesses — credential persistence through the checkout token, overly broad GITHUB_TOKEN permissions, unpinned action references, and template injection via ${{ ... }} expansion in run: blocks.

Alongside the new scan, this applies the corresponding hardening to the existing workflows so they pass the audit:

  • add persist-credentials: false to every actions/checkout step that lacked it
  • narrow top-level permissions: read-all to permissions: contents: read
  • add a 7-day cooldown to the dependabot update entries

The dpctl-only changes do not apply here: mkl_fft has no backfill-docs.yml (nor any other ${{ github.event.inputs.* }} used inside a run: block), and it does not use mshick/add-pr-comment, so the malformed version-pin fix is not relevant.

This is a CI/configuration-only change; no library code, tests, or documentation are affected.

Backport of IntelPython/dpctl#2374, adapted to mkl_fft's workflows:

- add a zizmor CI job that audits the workflow files under .github/
- add persist-credentials: false to every actions/checkout step that
  lacked it
- narrow top-level permissions: read-all to permissions: contents: read
- add a 7-day cooldown to the dependabot update entries

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thank you @antonwolfy

@antonwolfy
antonwolfy merged commit f26d59b into master Sep 3, 2026
122 of 127 checks passed
@antonwolfy
antonwolfy deleted the backport-zizmor-ci-hardening branch September 3, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants