This repository was archived by the owner on Sep 2, 2026. It is now read-only.
Repository navigation
Reject malformed host-bridge precursor receipts and add regression tests - #699
Open
pomazanbohdan wants to merge 1 commit into
Open
pomazanbohdan wants to merge 1 commit into
pomazanbohdan wants to merge 1 commit 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
nullvalues, weakening receipt identity checks.policy_bundle_ref(which should canonicalize tonull) while rejecting any other missing or unknown keys.Description
canonical_precursor_receiptincrates/taskflow-host-bridge/src/receipt_binding.rsto reject unknown keys and require allHOST_BRIDGE_PRECURSOR_RECEIPT_FIELDSto be present except for the legacypolicy_bundle_refcase.object.get(...).cloned().unwrap_or(Value::Null)behavior with explicit presence checks that returnhost_bridge_precursor_fingerprint_missingfor missing required fields while canonicalizing a missingpolicy_bundle_reftonull.precursor_fingerprint_rejects_padded_missing_required_fieldsandprecursor_fingerprint_allows_only_legacy_missing_policy_bundle_refto cover the padded-omission exploit and the legacy omission compatibility.crates/taskflow-host-bridge/src/receipt_binding.rsand the added tests in itstestsmodule.Testing
cargo test -p taskflow-host-bridgeand the package test suite passed (including receipt-binding tests); focused new tests passed.cargo test -p taskflow-host-bridge receipt_binding::tests -- --nocaptureto verify the receipt-binding unit tests — all passed.tests/precursor_fingerprint_public_api.rs) and it passed.cargo fmt -p taskflow-host-bridge -- --checkandgit diff --checkas hygiene checks; both succeeded.Codex Task