fix(ci): pin Action digests to exact semver to satisfy zizmor#112
Merged
Conversation
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>
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.
Why CI is red
MegaLinter v9.5.0 bundles zizmor v1.25.0, whose
ref-version-mismatchaudit 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
actions/checkout# v6→# v6.0.2jdx/mise-action# v4→# v4.0.1docker/login-action# v4→# v4.1.0actions/attest# v4→# v4.1.0github/codeql-action# v4→# v4.35.5googleapis/release-please-action# v5→# v5.0.0setup-crane # v0.5,git-auto-commit-action # v7.1.0,megalinter # v9.5.0,github-wiki-action # v5.0.4were already exact and left untouched)helpers:pinGitHubActionDigeststohelpers:pinGitHubActionDigestsToSemverso future digest bumps write the full semver comment and stay green.Verification
Ran zizmor 1.25.0 locally over
.github/workflows/:Once merged,
maingoes green. The open Renovate PRs go green after Renovate rebases them with the new preset (or auto-close as superseded).🤖 Generated with Claude Code