Skip to content

chore(ci): harden workflows, enforce zizmor - #85

Merged
JustMaris merged 1 commit into
mainfrom
claude/zizmor-hardening
Sep 24, 2026
Merged

JustMaris merged 1 commit into
mainfrom
claude/zizmor-hardening

Conversation

@JustMaris

@JustMaris JustMaris commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Permissions: explicit read-only permissions: on workflows that had none. The org default is already read-only; this makes it visible and drops read access to other scopes.
  • Checkout credentials: checkouts that never push no longer leave the token in .git/config. broker-audit, which opens a PR, keeps them explicitly.
  • Pins: third-party actions are SHA-pinned to the commits their tags point to today. Dependabot keeps them current.
  • App token: the release's dnb-robot token is scoped to contents (publishing the release and pushing the cask to homebrew-tap).
  • Caches: no Actions caches in the release and deploy jobs, where a cache written by another ref could end up in the published binaries or site. Releases will be slower: a cold Go build for 6 targets. Releases are rare, so that's the cheaper side of the trade.
  • zizmor: new job (reusable-actions zizmor.yml), gated by Required checks passed. The only accepted finding is the auto-merge workflow_run trigger, in .github/zizmor.yml.

Test plan

  • YAML parses, actionlint passes, and zizmor reports no findings at low and above with this repo's own config
  • CI passes on this PR, including the new zizmor job
  • Watch the next release, deploy and broker-audit runs: this PR's CI can't exercise them

- Explicit read-only `permissions:` on workflows that had none (the org default is read-only already; this makes it visible and drops read access to other scopes).

- Checkouts that never push no longer leave the token in .git/config (`persist-credentials: false`); ones that push say so explicitly.

- Third-party actions SHA-pinned at the commits their tags point to today; Dependabot keeps them current.

- dnb-robot app tokens scoped to what each job does instead of the app's whole grant.

- No Actions caches in release/deploy jobs, where a cache written by another ref could end up in what gets published.

- New zizmor job (reusable-actions zizmor.yml) gated by Required checks passed, so new findings block merges; accepted ones are in .github/zizmor.yml.
@JustMaris
JustMaris merged commit 0212ed0 into main Sep 24, 2026
5 checks passed
@JustMaris
JustMaris deleted the claude/zizmor-hardening branch September 24, 2026 10:07
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