ci: adopt zizmor for this repo's own workflows#799
Open
henryiii wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 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,
GH106can be un-ignored here.)Setup
zizmorpre-commit hook..github/zizmor.ymlrelaxingunpinned-usestoref-pin(actions are kept current via Dependabot, so hash pins aren't required).Fixes
permissions: {}with minimal per-job grants inci.yml(reusable-workflow callers getcontents: read, change-detection alsopull-requests: read) andcd.yml(distgetscontents: read).persist-credentials: falseon every checkout.action.ymlnow passes inputs (select,ignore,package-dir, action path, python path) throughenv:and references shell variables instead of interpolating${{ }}into therun:script.create-github-app-tokenis scoped topermission-contents: write+permission-pull-requests: write.cooldownfor the github-actions ecosystem.Documented ignore
docs-link.ymlkeepspull_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 onfork == false.Validation
zizmorreports "No findings" across all workflows +action.yml, andprek -a(including the new zizmor hook) passes.📚 Documentation preview 📚: https://scientific-python-cookie--799.org.readthedocs.build/