Add image-trust signal to the verify verdict, backed by a stub allowlist (STE-54)#5
Merged
yvesfracari merged 1 commit intoJun 12, 2026
Conversation
…ist (STE-54) Every verify result now carries an imageTrust tier orthogonal to the match verdict: sdf-trusted / publicly-auditable / arbitrary / unknown. Reproducibility alone is not faithfulness to source — a hostile build image can deterministically rewrite bytes and still pass byte-comparison — so image trust is a graded signal, not a binary. The tier is derived by looking up the on-chain WASM's SEP-58 bldimg in the checked-in docker/allowlist.json, seeded with this repo's pinned toolchain image (publicly-auditable) and a documented placeholder shape for future SDF stellar-cli-docker digests (sdf-trusted). Eviction from the allowlist downgrades the tier reported for past verifications; it never deletes verification records.
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 STE-54
What
Adds a second, orthogonal trust dimension to the verification verdict: every verify result now carries an
imageTrusttier describing how trustworthy the declared build image is. Rationale (from the RFP): reproducibility alone is not faithfulness to source — a hostile build image can deterministically rewrite bytes and still pass byte-comparison, so image trust must be a graded signal, not a binary.sdf-trustedpublicly-auditablearbitrarybldimgwas declared but is not allowlistedunknownbldimgmetadata availableHow
docker/allowlist.json(new): checked-in allowlist mapping image references/digests to a tier, seeded with this repo's pinned toolchain image fromdocker/toolchain-manifest.json(publicly-auditable, digest null while the image is only built locally) and a documented placeholder entry shape for future SDFstellar-cli-dockerdigests (sdf-trusted). Doc header records the eviction semantics: removing an entry downgrades the tier reported for past verifications; it never deletes verification records.reader/src/image-trust.ts(new):ImageTrustTier,AllowlistEntry, purederiveImageTrust(bldimg, allowlist)(digest match or exact-reference match, first hit wins), andloadAllowlist()(missing file → empty allowlist; malformed file or an entry granting a non-allowlistable tier throws).reader/src/verify.ts:VerificationResultgainsimageTrust+bldimg; trust is judged on the on-chain WASM's SEP-58bldimg(exposed by STE-53).verifyByIdloads the default allowlist (overridable via options); the ERROR path reportsunknown(no on-chain bytes → no metadata to judge).verifyprints atrust:line with the tier and thebldimgvalue;--jsonincludes the new fields automatically. Exit-code semantics unchanged (0 only on FULL_MATCH).Testing
deriveImageTrust, allowlist loading/validation, andcompareWasmcarrying the tier through every verdict (including: trust judged on on-chain metadata, not the rebuilt WASM's).SOROSCAN_INTEGRATION=1): fixture still reads/verifies; a new test derives its tier from on-chain metadata —unknown, correct since the fixture predatesbldimgstamping.