fix(zcashd): verify managed binary cache#223
Draft
ValarDragon wants to merge 1 commit into
Draft
Conversation
|
Note Complete: Audit complete. V12 did not find any issues that need review. Open the full results here. Analyzed two files, diff |
ValarDragon
force-pushed
the
agent/verify-zcashd-cache-binary
branch
from
July 17, 2026 17:23
49e7e25 to
ad571f6
Compare
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.
Motivation
The managed zcashd resolver previously treated a cache entry as valid when a
sidecar file contained the manifest's archive digest. That did not verify the
cached executable bytes, so a replaced
zcashdbinary could be reused andspawned.
Solution
Add the extracted executable's SHA-256 to the embedded release manifest.
The resolver now hashes the cached binary and compares it directly with that
manifest pin before reuse. Installation also verifies the extracted binary
before persisting it. The obsolete archive-digest sidecar is no longer trusted.
Release Docker context preparation and the local compat Docker Make target now
verify the extracted executable too. The release checklist requires recording
both the archive and executable digests for each managed artifact.
The regression test replaces a successfully installed cached executable, then
confirms the next resolution downloads and restores the manifest-pinned binary.
Test evidence
cargo fmt --all -- --checkcargo test -p zakura zcashd_compat::managed --lockedcargo clippy -p zakura --lib -- -D warningsbash -n scripts/resolve-zcashd-compat-manifest.shmake -n compat-zcashd-preparecargo clippy -p zakura --all-targets -- -D warningsis currently blocked byan existing unused import in
zakurad/tests/acceptance.rs.Issue
No linked issue.
AI disclosure
Used OpenAI Codex to implement the cache-integrity verification and regression
test.