Skip to content

ci: adopt zizmor for this repo's own workflows#799

Open
henryiii wants to merge 1 commit into
mainfrom
henryiii/feat/zizmor-self
Open

ci: adopt zizmor for this repo's own workflows#799
henryiii wants to merge 1 commit into
mainfrom
henryiii/feat/zizmor-self

Conversation

@henryiii

@henryiii henryiii commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

🤖 AI text below 🤖

Follow-up to #798: adopts zizmor for this repo's own GitHub Actions and makes everything zizmor-clean. (This is the "full dogfooding" deferred in #798; once both land, GH106 can be un-ignored here.)

Setup

  • Adds the zizmor pre-commit hook.
  • Adds .github/zizmor.yml relaxing unpinned-uses to ref-pin (actions are kept current via Dependabot, so hash pins aren't required).

Fixes

  • excessive-permissions: top-level permissions: {} with minimal per-job grants in ci.yml (reusable-workflow callers get contents: read, change-detection also pull-requests: read) and cd.yml (dist gets contents: read).
  • artipacked: persist-credentials: false on every checkout.
  • template-injection: action.yml now passes inputs (select, ignore, package-dir, action path, python path) through env: and references shell variables instead of interpolating ${{ }} into the run: script.
  • github-app: the bump bot's create-github-app-token is scoped to permission-contents: write + permission-pull-requests: write.
  • dependabot-cooldown: added a 7-day cooldown for the github-actions ecosystem.

Documented ignore

  • dangerous-triggers: docs-link.yml keeps pull_request_target (required for the Read the Docs preview to comment on PRs from forks) with an inline # zizmor: ignore[dangerous-triggers] — no untrusted code is checked out and it's gated on fork == false.

Validation

zizmor reports "No findings" across all workflows + action.yml, and prek -a (including the new zizmor hook) passes.


📚 Documentation preview 📚: https://scientific-python-cookie--799.org.readthedocs.build/

Add the zizmor pre-commit hook and a .github/zizmor.yml (unpinned-uses
relaxed to ref-pin, since actions are maintained via Dependabot), then make
all workflows and the composite action zizmor-clean:

- excessive-permissions: top-level permissions: {} with minimal per-job
  grants in ci.yml and cd.yml.
- artipacked: persist-credentials: false on all checkouts.
- template-injection: pass inputs through env vars in action.yml.
- github-app: scope the bump bot's app token to contents + pull-requests.
- dependabot-cooldown: add a 7-day cooldown for actions.
- dangerous-triggers: documented ignore for the RTD preview
  pull_request_target (no untrusted checkout, gated on fork == false).

Assisted-by: ClaudeCode:claude-opus-4.8
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