Skip to content

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

Merged
antonwolfy merged 1 commit into
masterfrom
harden-github-actions-workflows
Sep 3, 2026
Merged

ci: harden GitHub Actions workflows and add zizmor scan#2374
antonwolfy merged 1 commit into
masterfrom
harden-github-actions-workflows

Conversation

@antonwolfy

Copy link
Copy Markdown
Collaborator

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 — unpinned action references, credential persistence through the checkout token, template injection via ${{ ... }} expansion in run: blocks, and overly broad GITHUB_TOKEN permissions.

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
  • move github.event.inputs.tag into an env: var in backfill-docs.yml to avoid template injection in a run: block
  • fix a malformed version-pin comment for mshick/add-pr-comment (# v3.12.0.8.3.12.0 -> # v3.12.0)
  • add a 7-day cooldown to the dependabot update entries

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

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
antonwolfy marked this pull request as draft September 2, 2026 17:22
@antonwolfy antonwolfy self-assigned this Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 74.959%. remained the same — harden-github-actions-workflows into master

@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 3bedfe3 into master Sep 3, 2026
111 of 161 checks passed
@antonwolfy
antonwolfy deleted the harden-github-actions-workflows 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.

3 participants