Expand description
How a fetched daemon release is proven (BIND-18): which checks, in what order, and which failures stop the fetch.
The policy is fetch_release, written against two ports: ReleaseSource for the
release’s files and AttestationVerifier for the Sigstore check. microvms-edges
implements both (reqwest against GitHub, sigstore-verify with its embedded trusted root)
and owns the cache and the file writes around them. Here, the order is the whole point:
- Download the asset.
- Fetch an attestation bundle for its digest. When one arrives, it must verify against
Signer::releasefor the requested tag, or the fetch stops: the bytes are discarded and nothing else is tried. Falling through to the checksum here would launder bytes that failed provenance into a weaker check that can’t see what was wrong with them. - When the release answers that it publishes no bundle for these bytes
(
Bundles::Absent), the fetch stops the same way. Every release that shipsSHA256SUMS(v0.5.0 on) also ships its bundle, so a missing one never means an older release: it means the asset isn’t the one the release workflow built. Someone who can edit a release’s assets but can’t run its workflow would otherwise delete the bundle, upload their own asset with a matchingSHA256SUMS, and pass aschecksum. - Only when no answer can be had at all (
Bundles::Unreachable: a transport failure, a rate limit, a server error), check the bytes against the release’sSHA256SUMS. A release with noSHA256SUMS(every tag before v0.5.0) fails closed rather than trusting TLS alone.
That’s the table crates/model/src/provision.rs checks, with “a bundle arrived, or the release
answered that it has none” where it says “gh downloaded”. Verification tells the
caller which proof it got.
Structs§
- Fetched
- The asset’s bytes, and how they were proven.
- Signer
- Who must have signed a release’s attestation, and what it must attest.
Enums§
- Bundles
- What a lookup of the attestation bundles for one digest found. Each reason is prose; the policy adds what it means.
- Verification
- How a fetched binary’s bytes were proven.
Constants§
- ACTIONS_
ISSUER - The OIDC issuer of a GitHub Actions workflow identity.
- ASSET
- The release asset’s name: a literal, because the README’s
--pattern agentdand the checksum lookup both match it exactly. - CHECKSUMS
- The release asset listing every other asset’s SHA-256, in
sha256sum’s format. - RELEASE_
REPO - The repository whose releases carry the daemon asset.
- RELEASE_
WORKFLOW - The workflow that builds and attests the release, relative to the repository root.
- SLSA_
PROVENANCE_ V1 - The in-toto predicate type
actions/attest-build-provenancewrites, and the onegh attestation verifyrequires by default.
Traits§
- Attestation
Verifier - The Sigstore check over one bundle.
- Release
Source - Where a release’s files come from. The error is prose; the policy adds what it means.
Functions§
- fetch_
release - Release
tag’sASSET, proven by attestation or, when no answer about its bundle can be had, by checksum. See the module docs for the order and why it’s that order. - sha256_
hex - The lowercase hex SHA-256 of
bytes. - verify_
sha256 - Checks
bytesagainstasset’s entry in aSHA256SUMSbody (<64 hex> <name>per line, sha256sum’s own format). In-process, becausesha256sumthe tool doesn’t exist on Windows.