Repository navigation
Conversation
Re-verifies an Auditant evidence bundle offline (hash chain, C2SP checkpoint signature, anchoring) and only then emits a software-only TRACE v0.2 log-import Trust Record. Tests, a demo bundle generator, and a conformance workflow pinned to agentrust-trace 0.11.0 and agentrust-trace-tests 0.6.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rajnisht7
left a comment
There was a problem hiding this comment.
Thanks for the submission, reproduced the claimed Level 0 path and the 14 tests pass, but several of the verification and semantic claims needs to be addressed:
-
C2SP checkpoint - The code treats the last event’s hash-chain tip as the checkpoint headHash. C2SP defines the third line as the RFC 6962 Merkle tree root. No Merkle tree is built or verified.
-
Checkpoint fail-open- A valid anchoring checkpoint can coexist with a failed one (unknown key, bad signature, etc.) and still return ok=True. This contradicts the README statement that any failure means no record is written. The policy needs to be explicit and enforced.
-
Model identity-Supplying both --model-provider and --model-id accepts any pair, even one that never appears in the bundle. Supplying only one silently overwrites it with the inferred value. Explicit selections must be validated against the actual model-call events.
-
TRACE field semantics
- policy.bundle_hash hashes only policy identifiers (policyId / policyVersion / engine), not the policy bundle the schema defines.
- tool_transcript.hash hashes the entire raw export, not the tool-call transcript.
- origin.producer is set to the adapter (auditant-trace/0.1.0) instead of the system that produced the source evidence.
- subject is a constructed spiffe:// from the log ID; that does not establish a workload identity.
- runtime.measurement is a checkpoint-body digest, not a hardware measurement (already disclosed, but the field still carries the wrong meaning).
-
Input handling-check_bundle promises it never raises on bad content, but malformed events, top-level non-objects, missing keys, etc. raise AttributeError/KeyError instead of a controlled BundleNotVerified. Base64 decoding is permissive (non-canonical encodings are accepted). isinstance(..., int) accepts booleans for treeSize/seq.
-
Tests-The current suite does not cover valid+invalid checkpoints, contradictory model overrides, non-canonical Base64, boolean sizes, or malformed structures. The demo bundle is also generated by the same code under review.
…CE fields, strict input (review on agentrust-io#433) Checkpoints: every checkpoint must verify, not only the anchoring one; one inside the window that signs a different head contradicts the chain and fails; the start of the bundle must be genesis or signed, so deleting the first events is caught. The checkpoint is described as what it is: a C2SP line layout over a hash-chain head, not an RFC 6962 Merkle root, so not a C2SP checkpoint. Fields: built with agentrust-trace-adapters build_record. subject, policy bundle bytes and workload digest come from the operator; origin.producer is Auditant (https://auditant.co) and source_event_id the anchored eventId; tool_transcript.hash is over the tool_call events only; runtime.measurement is the library's software commitment. Explicit model choices must match a model_call event. 'declared' is refused when the bundle holds policy decisions. Records come only from a whole log. Input: structure validated before any check (bool is not an int, digests, eventId, duplicate JSON keys, deep nesting), canonical base64 only; malformed input is BundleNotVerified, the CLI exits 2 with a message. Tests: 66, on fixtures made by Auditant's own TypeScript core and verified by it, replacing the Python demo generator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks Rajnish, you were right on all of it. The C2SP one goes back to Auditant itself actually, it's a hash chain head and not a Merkle root, so here I don't call it a C2SP checkpoint anymore. Pushed 596f4a9, every point you raised is in there, the commit message has each one. Tests are 66 now and the fixtures come from Auditant's own exporter, not from this code. |
…openshell NVIDIA/OpenShell moved to ai-openshell/openshell; the old issue URL now returns 404 and fails the documentation link check on every PR. The issue itself is the same (#2745, closed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rajnisht7
left a comment
There was a problem hiding this comment.
Thank you for the update, a few things still needs to be addressed:
- PR description is stale : still describes the old behaviour (C2SP checkpoint, transcript = whole bundle hash, policy identifiers only, 14 tests, demo-bundle.json). Kindly update it to match HEAD + README.
- Truncation at checkpoint boundary is accepted : a prefix kept exactly at a valid checkpoint (e.g. events 0–3 + CP at treeSize 4) verifies and produces a record. This breaks the README promise that records come only from a whole log. Validate the export’s authoritative head / final tree size and reject such prefixes. Add the adversarial test.
- Enforcement mode vs evidence is incomplete:
- declared is only rejected on actionType == "policy_decision". Policy can also appear on tool_call (especially with outcome: blocked / pending_approval).
- monitorMode: true (documented by Auditant) is never inspected, so an operator can still claim enforce when the chain shows decisions were deliberately non-enforcing.
- Kindly check any event carrying a policy object, reject declared if any exist, and reject enforce if any have monitorMode: true. Add tests for both cases.
- Reject non-finite JSON constants (NaN / Infinity) in parse_bundle + tests.
- Document silent mode (accepted by CLI via PolicyEvidence.MODES but missing from README).
- Reject duplicate --pin-key IDs instead of silent overwrite.
- Event-ID uniqueness, fuller structural validation against Auditant 1.0.0 required fields, and explicit note that data_class is an operator assertion.
drk-ram
left a comment
There was a problem hiding this comment.
Reviewed efe33e54259d.
parse_bundle refuses duplicate keys and a non-bytes input. _check fails the chain before it will use a checkpoint, requires every checkpoint signature, and _public_key accepts only P-256. build_trust_record refuses a bundle whose first seq is not 0, and refuses enforcement_mode="declared" when the log has policy decisions. Pins are optional. The module says an unpinned signature is the bundle agreeing with itself.
tool_transcript_bytes is the RFC 8785 form of tool_call events only. The README says the same thing. The PR body still says tool_transcript.hash equals sha256 of the bundle file, and it calls the checkpoint a C2SP tlog-checkpoint. The README and the module docstring both say it is not. The body should match the README before someone reproduces the wrong hash.
Adds
integrations/auditant-evidence-bundle/: maps an Auditant evidence bundle (GET /v1/export, bundle format 1.0.0) to a TRACE v0.2 log-import Trust Record at Level 0.Before building a record it re-checks the bundle offline: the hash chain (seq, prevHash links, eventHash over RFC 8785), the C2SP tlog-checkpoint body and its ECDSA P-256 signature, and that a verified checkpoint covers the last event. A bundle that fails any check produces no record.
tool_transcript.hashissha256of the bundle bytes.enforcement_modehas no default. The README lists what is not claimed: no hardware attestation, bundle keys are self-asserted unless pinned with--pin-key, RFC 3161 tokens are not checked, the policy digest covers policy identifiers only, and there is no build provenance.Requesting the Verified tier. Reproduction, against released packages:
The demo bundle is synthetic and signed with a throwaway key. Locally, the same adapter also verified a bundle produced by Auditant's own exporter and that record passed Level 0.
validate_integrations.py(52 integrations, 0 failures),validate_compatibility.py, the index and marketplace catalog regenerated, and the lint gate (ruff check --select E4,E7,E9,F) all pass locally.Disclosure: I am the founder of Auditant and will maintain this integration.
🤖 Generated with Claude Code