fix(security): enforce schema conformance during verification - #156
Merged
Conversation
imran-siddique
marked this pull request as ready for review
August 11, 2026 15:37
# Conflicts: # docs/tutorials/verifying-a-trust-record.md
imran-siddique
added a commit
that referenced
this pull request
Aug 11, 2026
… absence first Schema enforcement (#156) refuses a record with no cnf before the cnf-to-trusted-key binding is reached, so the message changed while the rejection did not. The binding is still covered by the two tests where cnf is present and names the wrong key. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
imran-siddique
added a commit
that referenced
this pull request
Aug 11, 2026
* fix: bind cnf to trusted signing key * test: assert on cnf rather than the exact message, now schema catches absence first Schema enforcement (#156) refuses a record with no cnf before the cnf-to-trusted-key binding is reached, so the message changed while the rejection did not. The binding is still covered by the two tests where cnf is present and names the wrong key. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2 tasks
9 tasks
lywinged
added a commit
to lywinged/trace-spec
that referenced
this pull request
Aug 24, 2026
…y set here A vector set is a claim that an implementation which does not do the thing will fail it, and nothing in a set's own tests checks that claim: they run this verifier and compare verdicts, so they pass whether or not any other implementation could pass too. Two criteria are decidable from the fixtures and are implemented: no set may be satisfied by an unconditional answer in either direction, and margin is counted per declared boundary rather than per failure code. The second was written the wrong way round first, and the set that caught it was the one that had done it right. Applied to all three sets, ours included, with the shortfalls recorded exactly so they can neither widen nor be forgotten. verifier-compatibility separates 3 of its 8 vectors: since agentrust-io#156 made verify_record validate against a schema pinning eat_profile with a const, five of its refusal vectors are refused by the schema whether or not a verifier implements a single profile rule. The set was separating when written and no vector was edited. Verdict stability is not coverage stability. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Louielunz <48041247+lywinged@users.noreply.github.com>
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.
Why
A valid signature authenticates bytes; it does not make unknown fields, missing required claims, or invalid enum values part of TRACE.
verify_record()previously checked selected fields and the signature without enforcing the canonical v0.2 schema, creating separate notions of schema-valid and signature-valid records.What changed
verify_record()ValueErrorwith the failing field pathvalidate_json()transparencyoptional for unanchored Level 0/1 records, as the model, conformance levels, and documentation already requireVerification
ruff check src testsmypy src/agentrust_tracegit diff --checkNew regressions cover correctly signed records with an unknown top-level field, a missing required claim, and an invalid nested enforcement mode.