Skip to content

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

Merged
antonwolfy merged 1 commit into
mainfrom
ci/harden-workflows-zizmor
Sep 3, 2026
Merged

ci: harden GitHub Actions workflows and add zizmor scan#267
antonwolfy merged 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.

@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 3652762 into main Sep 3, 2026
220 checks passed
@antonwolfy
antonwolfy deleted the ci/harden-workflows-zizmor 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