Repository navigation
tools: verify GitHub Actions artifact digest before publishing (#4241) - #4441
Draft
fransarriogisbert-gif wants to merge 6 commits into
Draft
fransarriogisbert-gif wants to merge 6 commits into
fransarriogisbert-gif wants to merge 6 commits into
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.
Fixes #4241.
Prepared with AI assistance for fransarriogisbert-gif. This is the original patch reported in #4241, refreshed onto current main b1627e8; it is one contribution, not another bounty claim.
A completed HTTP response with the wrong bytes currently replaces an existing archive. Validate the API's optional
digestfield (sha256:<64 hex>) before downloading and verify SHA-256 before creating/replacing the archive. Missing/null digests retain legacy behaviour; redirect authentication and CRLF endings are unchanged.Static review of the related PR #4250 shows that it reads
sha256_sha, whereas GitHub's documented artifact-list response usesdigestwith thesha256:prefix:https://docs.github.com/en/rest/actions/artifacts
Its current diff and fixtures therefore do not exercise the API field in this report. This PR retains our independently published #4241 implementation and fixtures using the documented field. No competing source was copied.
Validation (local, 13 Nov 2026):
8e685a03: 557 top-level tools tests + 25 fuzz-harness + 29 runner tests passed (611 total, no skips), plus registration/conflict/guarantees/claims/census guards.2675e51a, using checksum-verified official Go 1.26.9 / Rust 1.99.0: version guard passes; compiler workspace 3293 passed/0 failed/ignored; corpus 139/139 with tripwire not fired; managed gate 2/2; differential FULL 47/47 build-and-run + 92/92 reject.Kept as a draft pending hosted CI and maintainer review. No merge, award, reserved funds or payment is claimed.