ci: pin rust-cache to the commit its version comment names - #394
Merged
Conversation
All 19 uses across ci.yml, release.yml and bench.yml pinned commit e18b497 with the comment `# v2`. The tag has since moved to 6323deb, and no tag points at e18b497 any more, so the comment asserted a version the pin does not have — which is what zizmor's ref-version-mismatch reports, once per use. A stale version comment is worse than no comment: it invites a reviewer to trust a claim that no longer holds, while the actual code being run is an unlabelled commit. The pin now names the release it really is, v2.9.2. Every other pinned action was checked the same way, by resolving each comment's tag against the pinned SHA: all 25 agree, so this was the only one adrift.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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 19 open
zizmor/ref-version-mismatchcode-scanning alerts.All 19 uses of
Swatinem/rust-cacheacrossci.yml,release.ymlandbench.ymlpinned commite18b497with the comment# v2. The tag has sincemoved to
6323deb, and no tag points ate18b497any more — so the commentasserted a version the pin does not have. That is what zizmor reports, once per
use.
A stale version comment is worse than no comment: it invites a reviewer to trust
a claim that no longer holds, while the code actually running is an unlabelled
commit. The pin now names the release it really is,
v2.9.2— verified byresolving the tag to
6323deb102c322ba6fcbdcafc7e3dddab59af2b6.Every other pinned action was checked the same way, by resolving each comment's
tag against its pinned SHA. All 25 agree, so this was the only one adrift.
The three remaining alerts are not fixable in code
Two Dependabot alerts,
pytest < 9.0.3(GHSA-6w46-j5rx-g56g). The patchedrelease requires Python >= 3.10, and the file it is reported against —
.github/requirements/ci-dev-py39.txt— exists precisely to serve the 3.9matrix rows. #383 already froze pytest there for this reason. The 3.10+ rows use
ci-dev-py3.txt, which is on 9.0.3 and unaffected.The advisory concerns pytest's handling of
/tmp/pytest-of-{user}. This suitenever creates that directory: it uses no
tmp_path,tmpdirortmp_path_factoryfixture anywhere, which I confirmed by running it andcomparing the directory before and after — unchanged. The vulnerable path is
never taken, so adding a
--basetempguard would be a flag protecting a codepath that is not exercised.
One Scorecard alert,
pipCommand not pinned by hashatci.yml:550. Thatline is
pip install --no-index --find-links dist … wickra, which installs thewheel built two steps earlier.
--no-indexmeans no index is consulted at all,so the risk the rule guards against cannot occur, and a freshly built artifact
has no upstream hash to pin. Rewriting it to a glob path to satisfy the
heuristic would churn an install step that runs across twelve job instances and
three operating systems, for no security gain.
All three want dismissal with a reason rather than a code change.