fix: pin action version comments to exact releases to resolve ref-version-mismatch - #48
Merged
Merged
Conversation
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.
Closes the
zizmor/ref-version-mismatchcode scanning alerts onci.yml(originally #1–#6).Cause
Three actions were pinned with a bare-major version comment:
A comment like
# v6is only accurate for as long as thev6tag happens to point at the pinned SHA. Every upstream release moves the tag, and the comment silently becomes wrong — which is whatref-version-mismatchreports.This is self-inflicted and self-perpetuating: Dependabot preserves whatever comment style it finds. On the PRs merged just before this one it rewrote
# v6back to# v6, so bumping alone never fixes it. Where the repo already used exact comments (actions/checkout # v7.0.0,trivy-action # v0.36.0,zizmor-action # v0.5.7) no alert was ever raised.Worth noting the recent bumps incidentally cleared four of the six alerts — the freshly bumped SHAs happen to be what
v6/v9point at right now. That is luck, not a fix; the next upstream release breaks them again.Change
Correct the six comments to the exact release each pinned SHA actually is:
actions/setup-go(×3)924ae3a…# v6→# v6.5.0actions/setup-node(×2)48b55a0…# v6→# v6.4.0golangci/golangci-lint-actionba0d7d2…# v9→# v9.3.0Each version was resolved by looking up which tag points at that exact SHA via the GitHub tags API, not inferred.
No SHA is changed — this is a comment-only diff, so there is zero behaviour change in CI. Deliberately not bumping
setup-nodeto the currentv6here even though it is a release behind; version bumps are Dependabot's job, and keeping this diff free of behaviour changes makes it trivially reviewable.Verification
zizmorlocally, same version the CI job runs:5 findings (3 suppressed) — 2 medium, bothref-version-mismatchonsetup-nodeNo findings to report. Good job! (3 suppressed)Also verified mechanically that the set of 40-char SHAs is byte-identical before and after the change.