Repository navigation
fix(lint): disable the zizmor self-repository audit in a shared config - #591
Conversation
zizmor 1.30 added the self-repository audit, which asks to rewrite every workspace-relative `uses: ./...` as `uses: $/...`. We pick the form per workflow instead: `$/` where a reusable workflow must call a sibling at its own commit (lint-include.yml calling lint.yml, #552) and `./` in callers. The audit fails lint on gating repos (home-assistant-win-companion#325) and adds code-scanning alerts here. - scripts/lint/zizmor.yml: shared config that disables self-repository, with the reason. It ships with lint.yml at the caller's pinned commit. - scripts/lint/zizmor.sh: pass it with --config unless the repo has its own .github/zizmor.yml or zizmor.yml (zizmor loads one config only). - tests/lint-scripts.sh: cover both cases. - docs/architecture.md: document the shared config.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
🟢 Approval recommended
The shared zizmor configuration change has no active review issues.
No open issues 🎉
What changed in this PR
Adds a shared zizmor configuration to the reusable lint workflow, disabling the self-repository audit while preserving repository-specific configuration.
Changes:
- Disables the audit centrally and documents the intentional use of both
$/and./workflow references. - Applies the shared config only when no repository config exists.
- Adds argument checks for both SARIF modes and repository-config overrides.
| File | Description |
|---|---|
tests/lint-scripts.sh |
Covers shared-config arguments and repository overrides. |
scripts/lint/zizmor.yml |
Disables self-repository with an explanatory comment. |
scripts/lint/zizmor.sh |
Selects the shared config unless a repository config exists. |
docs/architecture.md |
Documents config precedence and the disabled audit. |
Review effort: Balanced
|
@coderabbitai review |
Action not completed
|
…ing main docs/architecture.md takes main's version for now, so merging main is clean; the next commit after the merge restores the line-endings section next to #591's zizmor-config section. tests/lint-scripts.sh is the clean three-way merge of both. Refs #580 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Description
zizmor 1.30 added the
self-repositoryaudit. It fails Lint on gating repos (DevSecNinja/home-assistant-win-companion#325) and opened code-scanning alerts #27 to #31 here. We pick$/or./per workflow on purpose ($/inlint-include.ymlto calllint.ymlat its own commit, #552;./in callers), so the owner decided to disable the audit centrally (repo-steward T152 a). There was no shared zizmor config yet; this adds one that ships withlint.yml.Closes #590
Changes
scripts/lint/zizmor.yml: shared config that disablesself-repository, with the reason.scripts/lint/zizmor.sh: passes it with--configunless the repository has its own.github/zizmor.yml,.github/zizmor.yaml,zizmor.ymlorzizmor.yaml. zizmor loads one config only, so a repository config keeps working and replaces the shared one. Today that's DevSecNinja/devsecninja-com, which would need the rule in its ownzizmor.ymlif it hits the audit.tests/lint-scripts.sh: covers the shared config in both SARIF modes and a repository's own config.docs/architecture.md: documents the shared config (after v4.7.0).Callers pick this up with their next
lint.ymlpin bump (Renovate). Open PR #584 also editstests/lint-scripts.shbut in a different hunk; no open PR touches a zizmor config, so this isn't stacked.Checklist
mise exec -- lefthook run pre-commit): not run. repo-steward works API-only without a clone.zizmor.shwas smoke-tested in bash with a stubmise(shared config with and without SARIF, a repository config, exit code on failure);tests/lint-scripts.shruns in CI.steward commit-files)