Skip to content

ci: add zizmor, harden workflows, tighten release tag rule#163

Open
d-v-b wants to merge 2 commits into
zarr-developers:mainfrom
d-v-b:refresh-ci
Open

ci: add zizmor, harden workflows, tighten release tag rule#163
d-v-b wants to merge 2 commits into
zarr-developers:mainfrom
d-v-b:refresh-ci

Conversation

@d-v-b

@d-v-b d-v-b commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Add the zizmor pre-commit hook (zizmorcore/zizmor-pre-commit@v1.25.2) to
audit GitHub Actions workflows for security issues, and resolve every
finding it raised:

  • SHA-pin all actions across all workflows, with version comments so
    dependabot can still track and bump them (unpinned-uses)
  • Add deny-all top-level permissions: {} plus least-privilege
    per-job grants (excessive-permissions)
  • Set persist-credentials: false on all checkouts (artipacked)
  • Add a 7-day dependabot cooldown (dependabot-cooldown)
  • Publish to PyPI via OIDC trusted publishing only: drop the
    PYPI_API_TOKEN password and add id-token: write
    (use-trusted-publishing)
  • Bind the publish job to the release environment

The release environment's deployment rule is also tightened to only
allow tags matching v[0-9].[0-9].[0-9]* (configured on GitHub).

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

d-v-b and others added 2 commits June 9, 2026 12:34
Add the zizmor pre-commit hook (zizmorcore/zizmor-pre-commit@v1.25.2) to
audit GitHub Actions workflows for security issues, and resolve every
finding it raised:

- SHA-pin all actions across all workflows, with version comments so
  dependabot can still track and bump them (unpinned-uses)
- Add deny-all top-level `permissions: {}` plus least-privilege
  per-job grants (excessive-permissions)
- Set `persist-credentials: false` on all checkouts (artipacked)
- Add a 7-day dependabot cooldown (dependabot-cooldown)
- Publish to PyPI via OIDC trusted publishing only: drop the
  PYPI_API_TOKEN password and add `id-token: write`
  (use-trusted-publishing)
- Bind the publish job to the `release` environment

The `release` environment's deployment rule is also tightened to only
allow tags matching v[0-9]*.[0-9]*.[0-9]* (configured on GitHub).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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