Skip to content

fix(ci): pin Action digests to exact semver to satisfy zizmor#112

Merged
ChipWolf merged 1 commit into
mainfrom
fix/zizmor-ref-version-mismatch
Jun 18, 2026
Merged

fix(ci): pin Action digests to exact semver to satisfy zizmor#112
ChipWolf merged 1 commit into
mainfrom
fix/zizmor-ref-version-mismatch

Conversation

@ChipWolf

Copy link
Copy Markdown
Owner

Why CI is red

MegaLinter v9.5.0 bundles zizmor v1.25.0, whose ref-version-mismatch audit fails when a hash-pinned action's version comment doesn't match the exact tag the pinned SHA resolves to. Our pins used major-only comments (# v6) while the SHA resolves to a patch tag (v6.0.2), so zizmor flags every one.

This was failing MegaLinter on main (40 findings across all workflows) and on every PR, including the five open Renovate digest PRs (#100, #101, #102, #103, #108) — so the failures were pre-existing, not introduced by Renovate.

What this does

  • Corrects each pin comment to the exact semver tag of its currently-pinned SHA (SHAs unchanged):
    • actions/checkout # v6# v6.0.2
    • jdx/mise-action # v4# v4.0.1
    • docker/login-action # v4# v4.1.0
    • actions/attest # v4# v4.1.0
    • github/codeql-action # v4# v4.35.5
    • googleapis/release-please-action # v5# v5.0.0
    • (setup-crane # v0.5, git-auto-commit-action # v7.1.0, megalinter # v9.5.0, github-wiki-action # v5.0.4 were already exact and left untouched)
  • Switches Renovate from helpers:pinGitHubActionDigests to helpers:pinGitHubActionDigestsToSemver so future digest bumps write the full semver comment and stay green.

Verification

Ran zizmor 1.25.0 locally over .github/workflows/:

No findings to report. Good job! (23 suppressed)

Once merged, main goes green. The open Renovate PRs go green after Renovate rebases them with the new preset (or auto-close as superseded).

🤖 Generated with Claude Code

MegaLinter v9.5.0 bundles zizmor v1.25.0, whose `ref-version-mismatch`
audit fails when a hash-pinned action`s `# vMAJOR` comment does not match
the exact tag the pinned SHA resolves to (e.g. `# v6` when the SHA is
tagged `v6.0.2`). This was failing MegaLinter on `main` (40 findings) and
on every PR, including the open Renovate digest PRs.

Correct each pin comment to the precise semver tag of its current SHA
(SHAs unchanged) and switch Renovate from `helpers:pinGitHubActionDigests`
to `helpers:pinGitHubActionDigestsToSemver` so future digest bumps keep
the comment exact. Verified locally: zizmor 1.25.0 reports no findings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ChipWolf ChipWolf merged commit 4df0d4c into main Jun 18, 2026
14 of 16 checks passed
@ChipWolf ChipWolf deleted the fix/zizmor-ref-version-mismatch branch June 18, 2026 13:57
@github-actions github-actions Bot mentioned this pull request Jun 18, 2026
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