From 1f53bd8a6bfe44b8806f36ee0d3895d42e80ed0c Mon Sep 17 00:00:00 2001 From: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com> Date: Thu, 1 Oct 2026 21:52:13 -0400 Subject: [PATCH] Snapshot evidence payloads before hashing and appending Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com> --- specialized/agentic-identity-trust.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/specialized/agentic-identity-trust.md b/specialized/agentic-identity-trust.md index a63defa6..59cdcfcc 100644 --- a/specialized/agentic-identity-trust.md +++ b/specialized/agentic-identity-trust.md @@ -165,6 +165,11 @@ class DelegationVerifier: ### Evidence Record Structure ```python +from copy import deepcopy +from datetime import datetime +import hashlib +import json + class EvidenceRecord: """ Append-only, tamper-evident record of an agent action. @@ -185,9 +190,9 @@ class EvidenceRecord: record = { "agent_id": agent_id, "action_type": action_type, - "intent": intent, + "intent": deepcopy(intent), "decision": decision, - "outcome": outcome, + "outcome": deepcopy(outcome), "timestamp_utc": datetime.utcnow().isoformat(), "prev_record_hash": prev_hash, } @@ -199,7 +204,9 @@ class EvidenceRecord: # Sign with agent's key record["signature"] = self.sign(canonical.encode()) - self.append(record) + # Keep caller-owned inputs and the returned record independent of the + # stored snapshot; later mutations must not invalidate its signed hash. + self.append(deepcopy(record)) return record ```