evidence-chain

evidence-chain is a command for coding agents from HermeticOrmus/LibreSecOps-Claude-Code. It costs 0 tokens per session (1,192 once invoked), scanned A, original, MIT.

A command for recording who handled digital evidence, what they did, and when they did it. This record is called a chain of custody and helps show that files, device images, logs, or other evidence were not improperly changed.

In plain words
What is it for?
Use it when collecting, copying, transferring, storing, examining, returning, or disposing of digital evidence, with optional hash checks and legal formatting.
Why use it?
It reduces gaps in evidence records that could make the evidence harder to trust or use in legal proceedings.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/hermeticormus/libresecops-claude-code/evidence-chain
Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreSecOps-Claude-Code

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for evidence-chain

README.md
[![agentmods](https://agentmods.dev/badge/commands/hermeticormus/libresecops-claude-code/evidence-chain.svg)](https://agentmods.dev/commands/hermeticormus/libresecops-claude-code/evidence-chain)
Your own site
<a href="https://agentmods.dev/commands/hermeticormus/libresecops-claude-code/evidence-chain"><img src="https://agentmods.dev/badge/commands/hermeticormus/libresecops-claude-code/evidence-chain.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,192 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01192
Opus 5 $0.00000 $0.00596
Sonnet 5 $0.00000 $0.00238
Haiku 4.5 $0.00000 $0.00119

Measured 5d ago against content hash 83bd835ee32c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

evidence-chain scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/forensics-analysis/commands/evidence-chain.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/evidence-chain

Document a chain of custody record for collected digital evidence, ensuring integrity and admissibility.

Trigger

Use every time digital evidence is:

  • Collected from a system
  • Transferred between locations or storage
  • Accessed for analysis
  • Copied or imaged
  • Returned or disposed of

Chain of custody documentation must begin at the moment evidence is identified and continue through final disposition. Gaps in the chain compromise evidence integrity.

Input

  • Required: Evidence description (what is it, where does it come from)
  • Required: Action being performed (collection, transfer, analysis, storage, disposal)
  • Required: Person performing the action
  • Optional: Case ID (should be established by /forensic-plan)
  • Optional flag: --verify -- include hash verification step
  • Optional flag: --legal -- use formal legal chain of custody format

Process

  1. Evidence Identification: Document what the evidence is:

    • Physical description (device type, serial number, model, capacity)
    • Digital description (disk image, memory dump, log export, network capture)
    • Source system (hostname, IP, location)
    • Relevance (why this evidence matters to the investigation)
  2. Integrity Verification: Compute and record cryptographic hashes:

    • SHA-256 hash of the evidence file or disk
    • Hash recorded at time of collection
    • Hash verified at every subsequent access
    • Any hash mismatch is a critical event that must be documented and investigated
  3. Chain of Custody Entry: Record the custody transfer:

    • Date and time (UTC)
    • Person releasing custody (name, role, contact)
    • Person receiving custody (name, role, contact)
    • Purpose of transfer (collection, analysis, storage, legal hold)
    • Storage location (locked cabinet, evidence locker, encrypted storage, forensic workstation)
    • Any changes to evidence packaging or storage conditions
  4. Storage Requirements: Document storage conditions:

    • Physical security (locked room, access log)
    • Environmental protection (temperature, humidity for hardware)
    • Digital security (encryption at rest, access controls)
    • Retention period (legal hold duration, retention policy)

Read the full file on GitHub · 122 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 122 lines · 0 tokens per session scan A 83bd835ee32c

Subscribe to this mod's changes

evidence-chain is a command published in the GitHub repository HermeticOrmus/LibreSecOps-Claude-Code (4 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,192 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.