fix(pre-commit): drop stray .git suffix from yamllint repo url - #402
Merged
Conversation
Zizmor 1.30.0 (pulled in via zizmorcore/zizmor-action v0.6.2 -> v0.6.3 in #397) extends the ref-confusion audit to also cover .pre-commit-config.yaml. It resolves each repo: URL to a GitHub owner/repo path and calls the GitHub API to list branches. The adrienverge/yamllint entry was the only repo: in the file with a trailing .git suffix. Zizmor includes that suffix literally in the API path (GET /repos/adrienverge/yamllint.git/branches -> 404 Not Found), mapped to 'can't access adrienverge/yamllint.git: missing or you have no access' and treated as fatal, breaking the 'Check the repository github actions workflows' CI job. Not a GITHUB_TOKEN scope issue: adrienverge/yamllint is public, and the failure reproduces locally, anonymously, with zizmor 1.30.0. Dropping the stray .git suffix, matching every other repo: entry in this file, fixes it. Same fix applied previously in looztra/yamkix#517.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #402 +/- ##
=======================================
Coverage 79.14% 79.14%
=======================================
Files 11 11
Lines 235 235
Branches 28 28
=======================================
Hits 186 186
Misses 45 45
Partials 4 4 ☔ View full report in Codecov by Harness. |
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.
Description
Zizmor 1.30.0 (pulled in via the
zizmorcore/zizmor-actionv0.6.2 -> v0.6.3 bump in #397) extends theref-confusionaudit to also cover.pre-commit-config.yaml. It resolves eachrepo:URL to a GitHubowner/repopath and calls the GitHub API to list branches.The
adrienverge/yamllintentry in.pre-commit-config.yamlwas the onlyrepo:in the file with a trailing.gitsuffix. Zizmor includes that suffix literally in the API path (GET /repos/adrienverge/yamllint.git/branches->404 Not Found), which it maps tocan't access adrienverge/yamllint.git: missing or you have no accessand treats as fatal — breaking theCheck the repository github actions workflowsCI job (confirmed failing on #397).This is not a
GITHUB_TOKENscope/permissions issue:adrienverge/yamllintis public, and the failure reproduces identically running zizmor 1.30.0 locally, anonymously, against this repo. Dropping the stray.gitsuffix — matching every otherrepo:entry in this file — fixes it.Same issue, same fix, previously applied in looztra/yamkix#517.
Type of change
How has this been tested?
uv run poe testpasses (77 passed)make integration-testspasses (11 passed)uv run poe lint:allpasses (ruff, ty, pylint, pyright)uv run pre-commit run --all-filespasseszizmor .->fatal: no audit was performed/couldn't list branches for adrienverge/yamllint.git/can't access adrienverge/yamllint.git: missing or you have no access.zizmor .->No findings to report. Good job! (6 ignored, 18 suppressed).uv run pre-commit run yamllint --all-files-> hook still resolves/clonesadrienverge/yamllintand passes, confirming the URL change doesn't break pre-commit itself.