Skip to content

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

Open
antonwolfy wants to merge 1 commit into
mainfrom
ci/harden-workflows-zizmor
Open

ci: harden GitHub Actions workflows and add zizmor scan#267
antonwolfy wants to merge 1 commit into
mainfrom
ci/harden-workflows-zizmor

Conversation

@antonwolfy

@antonwolfy antonwolfy commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

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.

zizmor audits GitHub Actions workflows for supply-chain and privilege-escalation weaknesses — credential persistence through the checkout token, overly broad GITHUB_TOKEN permissions, template injection via ${{ ... }} expansion in run: blocks, and unpinned action references.

Changes

  • New .github/workflows/zizmor.yml — runs the zizmor scan on push to main and on pull requests. Top-level permissions: {}, job-level contents: read, min-severity: medium so informational template-injection notes on internally-defined values annotate without gating CI.
  • persist-credentials: false added to every actions/checkout step that lacked it, so the checkout token is not left in the runner's git config for later steps to reuse.
  • Narrowed permissions: read-all to permissions: contents: read in every workflow that used the broad default.
  • 7-day cooldown added to both dependabot.yml 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/, and apply the corresponding hardening so the
existing workflows pass the audit:

- add persist-credentials: false to every actions/checkout step that
  lacked it, so the checkout token is not left in the runner's git
  config for later steps to reuse
- narrow top-level permissions: read-all to permissions: contents: read
- add a 7-day cooldown to the dependabot update entries

CI/configuration-only; no library code, tests, or docs are affected.
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.

1 participant