Subscribe to the Non-Human & AI Identity Journal

Chain of custody

A documented record that preserves the integrity of evidence from the moment an event is detected through investigation and response. In identity and data protection workflows, it helps prove what happened, when it happened, and which actor or session was involved.

Expanded Definition

In NHI security, chain of custody is the tamper-evident record that tracks evidence as it moves from detection to containment, investigation, and recovery. It matters because modern identity incidents often involve ephemeral sessions, API tokens, and autonomous NIST Cybersecurity Framework 2.0 aligned workflows that can change state rapidly.

Good chain of custody does more than log file access. It records who collected the evidence, when it was collected, how it was stored, who handled it, and whether any integrity checks were performed. In NHI and agentic AI environments, that can include service account tokens, MCP interactions, model prompts, audit exports, and session artifacts. Definitions vary across vendors on how broadly this should extend, but no single standard governs this yet, so organisations should treat the concept as an evidence-integrity discipline rather than a simple ticketing note. The strongest programs pair custody records with cryptographic hashes, restricted access, and immutable logging so investigators can defend conclusions during internal review or legal escalation.

The most common misapplication is treating a screenshot, spreadsheet, or incident note as sufficient chain of custody, which occurs when evidence changes hands without timestamped transfer records or integrity verification.

Examples and Use Cases

Implementing chain of custody rigorously often introduces operational friction, requiring organisations to weigh investigative defensibility against the speed of incident response and evidence handling.

  • A compromised service account is isolated, and the exported audit bundle is hashed, time-stamped, and stored before analysts inspect it, preserving evidentiary value for later review.
  • During a suspected token leak, responders document each transfer of logs and cloud snapshots so the investigation can prove whether the secret was exposed before or after containment.
  • An AI agent with tool access is found to have executed an unexpected action, and the team preserves the prompt history, tool calls, and session metadata to reconstruct intent and execution path.
  • Legal or regulatory teams request proof that a credential record was not modified after discovery; a custody trail helps demonstrate that the evidence reviewed matches the original artifact.
  • A cloud compromise is correlated with the DeepSeek breach style of secret exposure, and investigators retain the original export plus hash values before any remediation begins.

These workflows also align with the evidence preservation expectations reflected in security governance programs and with the broader incident handling discipline described by NIST Cybersecurity Framework 2.0. Where teams operate across SIEM, SOAR, and cloud platforms, the process should remain simple enough for responders to follow under pressure, yet strict enough to survive scrutiny.

Why It Matters in NHI Security

Chain of custody becomes critical when organisations need to answer not just what failed, but whether the evidence about that failure can be trusted. In NHI environments, attackers often target secrets, delegated access, and agent permissions precisely because those artifacts are easy to alter, delete, or replay. Once a token, key, or session record is handled informally, the investigation may still find the root cause, but it may not be able to prove it conclusively.

The scale of the problem is not theoretical. In The State of Secrets in AppSec, the average estimated time to remediate a leaked secret is 27 days, which means custody discipline must hold across a long remediation window, not just during the first response meeting. When evidence chains are weak, organisations also struggle to connect root cause analysis to governance action, especially when multiple teams handle the same credential set or incident artifacts. That is why custody records should be treated as part of the control plane, not an administrative afterthought. They support investigations, legal defensibility, and post-incident learning, especially when secrets sprawl is already documented in DeepSeek breach analysis and similar research.

Organisations typically encounter the cost of weak chain of custody only after a disputed incident, at which point evidence handling becomes operationally unavoidable to resolve the case.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST CSF 2.0 PR.DS Chain of custody supports data integrity and evidence preservation during response.
NIST Zero Trust (SP 800-207) SP 3 Zero trust requires continuous verification of access and state changes across evidence handling.
OWASP Non-Human Identity Top 10 NHI-09 Evidence trails are essential when investigating misuse of NHI credentials and sessions.

Preserve custody records for secrets, tokens, and agent actions throughout incident handling.