Repository navigation
fix(id): bind export blob refs to envelope content citations in verify_import - #13356
Merged
Merged
Conversation
…y_import verify_import trusted each object's caller-supplied blob_refs: it checked the named blobs' SHA-256 hashes but never proved the named bytes produce the content the object's signed envelope cites. blob_refs is covered by neither the envelope signature nor the manifest objects_digest, so a valid signed document.put envelope paired with a decoy blob verified cleanly and ingest stored the decoy while the cited content stayed unavailable. Step 3 now indexes carried blobs by citation identity (BLAKE3 of the bytes) and requires each object's declared references to name exactly the blobs its decoded envelope citations resolve to: a decoy or extra reference is a new typed refusal (BlobCitationMismatch), and a citation no carried blob resolves is MissingBlob. Regression tests cover the decoy, the missing cited blob, and the extra reference; the honest hosted-worker fixture and round-trip suites stay green.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 54 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
What
verify_import(§6.2 step 3) now binds each export object'sblob_refsto the content citations of its own verified envelope, instead of trusting the caller-supplied references:blob_refsmust name exactly that resolved set.ExportError::BlobCitationMismatch; a citation no carried blob resolves is refused with the existingMissingBlob. All refusals happen before ingest writes anything.Before this change, a valid signed
document.putenvelope citing content A could be paired with unrelated bytes B (withblob_refsnaming B's SHA-256) and pass verification —blob_refsis covered by neither the envelope signature nor the manifest'sobjects_digest— after which ingest stored B and left A unavailable.Verification
decoy_blob_is_refused,cited_blob_missing_is_refused,extra_blob_reference_is_refused) all failed against pre-change main and pass with the fix.cargo test --lib hosted_inpkgs/id(laptop,nix develop): 64 passed / 0 failed — including the honest hosted-worker fixture (produced_sets_fixture_verifies), the export/import round-trip, and the ingest round-trip.Fixes #13289
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-23T14:10:54Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": null, "model": null, "lane_start_issues": [], "workspace_ref": null, "auth_subject": "archer", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.