verify: accept validate* checksum helpers as JS download verification (unblocks #910)#912
Merged
Merged
Conversation
astral-sh/setup-uv@v8.2.0 refactored its uv-binary checksum validation out of src/download/download-version.ts into a sibling module (src/download/checksum/checksum.ts). The download site still calls validateChecksum(checksum, downloadPath, …) immediately after tc.downloadTool, but the same-file JS verification heuristic only recognised verify*/compute*/calculate* helper names — so it lost the createHash token and false-flagged the download as unverified, blocking the routine setup-uv bump in #910. Add the validate* checksum-helper family to the JS verification markers, plus a regression test anchored to the real setup-uv source. Generated-by: Claude Opus 4.8 (1M context)
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.
Summary
verify-action-build's binary-download check false-flagged the routineastral-sh/setup-uvbump in #910 as an unverified download.The flagged line is
src/download/download-version.ts:128:The download is verified —
validateChecksum(imported from the sibling./checksum/checksum) SHA-256s the artifact against a user-provided checksum or the built-inKNOWN_CHECKSUMStable. v8.2.0 just extracted that validation into the sibling module, moving thecreateHashtoken out ofdownload-version.tsand tripping the same-file heuristic (which only knewverify*/compute*/calculate*helper names).Fix
Add the
validate*checksum-helper family to_JS_VERIFICATION_PATTERNS. The call name is the in-file evidence that survives the refactor.Test plan
test_security.py(bare names + a faithful trim of the real setup-uv download→validate sequence).uv run pytest utils/tests/→ 278 passed.verify_action_build --from-pr 910→ exit 0, "verification present in file".Case E in the
analyze-action-prskill — JS analogue of #800 (siblingsha256sum -ccounts as verify).🤖 Generated with Claude Code