chore(precommit): scope zizmor hook to workflows, actions and dependabot#10997
Merged
Conversation
The zizmor pre-commit hook used `files: ^\.github/`, which matched any
file under `.github/` — including issue templates, the labeler config,
CODEOWNERS, etc. zizmor only audits GitHub Actions workflows, composite
actions and Dependabot configs, so on any commit that touched a
non-auditable `.github/` file it failed with `exit code 3`:
failed to validate input as workflow: input does not match expected
validation schema
fatal: no audit was performed
error: no inputs collected
Narrow the regex to `^\.github/(workflows|actions)/.+\.ya?ml$|^\.github/dependabot\.ya?ml$`
so zizmor only inspects what it can audit. Verified locally: the hook
skips on `.github/ISSUE_TEMPLATE/*.yml` and the manifest file itself,
and still runs (and passes) on `.github/workflows/api-bump-version.yml`.
Contributor
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
Contributor
🔒 Container Security ScanImage: 📊 Vulnerability Summary
5 package(s) affected
|
Keep only the load-bearing why (zizmor's audit surface + the exit-3 failure mode); the regex history and file list lived in the commit/PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
puchy22
approved these changes
May 11, 2026
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.
Context
The
zizmorpre-commit hook in.pre-commit-config.yamlwas configured withfiles: ^\.github/, which matches any file under.github/. zizmor only audits GitHub Actions workflows, composite actions and Dependabot configs, so any commit touching a non-auditable.github/file (issue templates,labeler.yml,CODEOWNERS, the labeler-action config,zizmor.ymlitself, …) failed the hook withexit code 3:Reproducible on
mastertoday: the recent issue-template addition (.github/ISSUE_TEMPLATE/new-check-request.yml, #10976) is enough to break the hook for anyone whose chain runs zizmor on those paths.Description
Narrow the
files:regex to the inputs zizmor actually audits:Coverage matrix (verified with
prek run zizmor --files <path>):.github/workflows/api-bump-version.yml.github/actions/<x>/action.yml.github/dependabot.yml.github/ISSUE_TEMPLATE/new-check-request.yml.github/labeler.yml/CODEOWNERS/zizmor.yml/pull_request_template.md.pre-commit-config.yaml(manifest)An inline comment in the hook block records the why, so the next maintainer doesn't broaden the regex back.
Steps to review
Checklist
Community Checklist
no-changeloglabel appliedSDK/CLI
UI
API
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.