Skip to content

fix(pre-commit): drop stray .git suffix from yamllint repo url - #402

Merged
looztra merged 1 commit into
mainfrom
fix/zizmor-ref-confusion-yamllint-git-suffix
Sep 9, 2026
Merged

fix(pre-commit): drop stray .git suffix from yamllint repo url#402
looztra merged 1 commit into
mainfrom
fix/zizmor-ref-confusion-yamllint-git-suffix

Conversation

@looztra

@looztra looztra commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Description

Zizmor 1.30.0 (pulled in via the zizmorcore/zizmor-action v0.6.2 -> v0.6.3 bump 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 in .pre-commit-config.yaml 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), which it maps to can't access adrienverge/yamllint.git: missing or you have no access and treats as fatal — breaking the Check the repository github actions workflows CI job (confirmed failing on #397).

This is not a GITHUB_TOKEN scope/permissions issue: adrienverge/yamllint is public, and the failure reproduces identically running zizmor 1.30.0 locally, anonymously, against this repo. Dropping the stray .git suffix — matching every other repo: entry in this file — fixes it.

Same issue, same fix, previously applied in looztra/yamkix#517.

Type of change

  • Bug fix

How has this been tested?

  • uv run poe test passes (77 passed)
  • make integration-tests passes (11 passed)
  • uv run poe lint:all passes (ruff, ty, pylint, pyright)
  • uv run pre-commit run --all-files passes
  • Verified with the actual failing tool, zizmor v1.30.0 (matching the pinned CI image):
    • Before fix: zizmor . -> 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.
    • After fix: zizmor . -> No findings to report. Good job! (6 ignored, 18 suppressed).
    • uv run pre-commit run yamllint --all-files -> hook still resolves/clones adrienverge/yamllint and passes, confirming the URL change doesn't break pre-commit itself.

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

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.14%. Comparing base (e84fa7e) to head (17f2b6e).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

@looztra
looztra merged commit 59cdbbd into main Sep 9, 2026
11 checks passed
@looztra
looztra deleted the fix/zizmor-ref-confusion-yamllint-git-suffix branch September 9, 2026 08:30
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