Skip to content

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

Merged
antonwolfy merged 3 commits into
masterfrom
harden-gh-workflows-zizmor
Sep 4, 2026
Merged

antonwolfy merged 3 commits into
masterfrom
harden-gh-workflows-zizmor

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
  • 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.

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:

- 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

This is a CI/configuration-only change; no library code, tests, or
documentation are affected.
@antonwolfy
antonwolfy force-pushed the harden-gh-workflows-zizmor branch from 826452b to 628fb7a Compare September 3, 2026 12:16
zizmor flagged three medium-severity template-injection findings where
workflow_call string inputs were expanded directly inside run: blocks.
Route each flagged input through an env: var and reference it as a shell
variable so no untrusted value is interpolated into the script text.
@antonwolfy antonwolfy self-assigned this Sep 3, 2026
@antonwolfy antonwolfy added this to the 2.9.0 release milestone Sep 3, 2026
@antonwolfy
antonwolfy merged commit 7b8367a into master Sep 4, 2026
80 checks passed
@antonwolfy
antonwolfy deleted the harden-gh-workflows-zizmor branch September 4, 2026 11:29
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