Skip to content
Figure 1The custody chain for one item of test evidence
The custody chain for one item of test evidenceCreatetool writes itemHashSHA-256 at onceLogwho, when, whatStoreread-only bucketTransformchild item, own hashReportsigned, time-stampedevery arrow is a custody log event; a state change with no logged event is a broken chain
Six links in a chain of custody for test evidence. Each log entry names the handler, the UTC time and the action; the hash proves the bytes did not change.

Chain of custody for test evidence: logs to signed reports

A chain of custody is an unbroken, documented record of who held an item of evidence, when, and what they did to it. Testers rarely think of a screenshot or a log as evidence until a supplier disputes a defect, an auditor asks how a detector benchmark was produced, or a lawyer asks whether an export was edited. This guide sets out the elements and how automation produces most of them.

Quick answer

Hash every evidence item with SHA-256 the moment it is created, write the hash, the creator and a synchronised timestamp into a custody log, store the item read-only, and treat every transformation as a new item linked to its parent. Time-stamp the report with an RFC 3161 token. A gap anywhere in that sequence is a gap in the evidence.

Key figures

Hash
SHA-256 at creation, before any copy
Clock
one synchronised source, UTC
Storage
write-once, hash re-checked on read
Handlers
named per event, no shared accounts
Transformations
new item, new hash, link to parent
Report
RFC 3161 time-stamp token or signature

What chain of custody means for a tester

Chain of custody is a term from forensic practice: a documented, unbroken record of possession and handling for an item of evidence, from creation to presentation. NIST SP 800-86 frames the record as the answer to four questions at every step: who handled the item, when, what was done to it, and how its integrity was preserved. Test evidence needs the same treatment when a result can be contested, whether the item is a screenshot, a log, a packet capture, a dataset, a detector report or a C2PA validator's output. The record has two layers: a hash that proves the bytes are unchanged, and a log that proves who held them.

Why a test result needs one

Two disputes recur. A vendor says a benchmark test set was altered after the run; the record shows the same dataset hash before the run and in the report. A platform team says the fixture behind a broken-manifest finding was corrupted in transit; the record shows its hash at creation, upload and validation. The surrounding document is the subject of the guide to records a hostile reader can check; this guide covers the chain those records depend on.

Chain of custody in one sentence

For every item, at every step: who, when, what was done, and a hash proving the bytes are the same. Miss one step and the item is an anecdote.

The six elements

Hash at creation. Compute a SHA-256 digest as soon as the producing tool writes the item, before any copy, upload or rename. A hash computed an hour later proves only that nothing changed after that hour. Custody log. Append one entry per event: item identifier, hash, handler, action, and a timestamp from a clock synchronised to a common source. NIST SP 800-92 treats synchronisation as a precondition for log evidence: logs with unrelated clocks cannot be ordered. Read-only storage. Keep the original where overwrites and deletions are rejected, such as a locked object store, and re-check the hash on every read.

Named handlers. Every event names a person or a specific automated identity; an entry saying the QA account exported the file does not say who did. Documented transformations. A cropped screenshot, a filtered log or a redacted export is a new item with its own hash, its own log entry and a link to the parent's hash, and the parent is kept. Signed or time-stamped report. The report lists every hash it relies on and is signed with a named key or time-stamped with an RFC 3161 token, which binds its hash to a time asserted by a third party.

Six evidence types, what to hash, what the custody log records alongside the hash, and where the chain most often breaks
Evidence typeWhat to hashWhat to recordWeakest point
ScreenshotFile as written by the capture toolBuild, screen, handler, UTC timeCropped copy replaces the original
Application or server logRotated file or exportHost, source, time range, clock offsetPulled later from a pruned store
Packet captureThe pcap or pcapng fileInterface, filter, host, start and stopFilters applied afterwards, passed off as raw
Exported datasetArchive plus per-file hashesSource, query, row count, schema versionReordering that changes bytes silently
Detector reportRaw output before formattingDetector and model version, thresholdSummary kept, raw output discarded
C2PA validation outputValidator's machine-readable outputValidator version, trust list, asset hashValidating a re-encoded copy

How to set up a chain of custody for test evidence

  1. Decide what counts as evidence

    Before the run, list the items whose integrity might be questioned: fixtures, raw outputs, screenshots, captures, exports. Put the list in the plan, following the template for a test plan that survives review.

  2. Synchronise the clocks

    Point every producing machine at one time source, record each offset at the start of the run, and log in UTC. A five-minute drift between hosts turns a clear sequence into a dispute.

  3. Hash at creation, automatically

    Wrap the capture and export tools so the digest is computed in the step that writes the file. A post-run script proves only the folder's state when it ran.

  4. Write the custody log as an append-only stream

    Each entry: item identifier, SHA-256, handler identity, action, UTC time, parent hash if any. Store it where entries cannot be edited, and hash the log after each session.

  5. Store originals read-only and derive from copies

    Upload originals to a write-once location whose reader verifies the hash before returning bytes. When a copy is cropped or filtered, record the tool, parameters, new hash and parent hash.

  6. Sign or time-stamp the report

    List every cited hash in the report, then obtain an RFC 3161 token for the report's own hash or sign it with a named key, and store the token with the report.

Worked example: one release, 312 evidence items

A team testing a document ingestion service with an AI text detector and a signed image pipeline counted its evidence items from one release and how many kept an unbroken chain. The counts are invented but realistic.

Figure 2Evidence items by type in one release, and how many kept an unbroken custody chain (worked example)
Evidence items by type in one release, and how many kept an unbroken custody chain (worked example)50100Screenshots118Application logs64Detector reports48Exported datasets12Packet captures9C2PA validation outputs30
Invented but realistic counts. Bars show items with an unbroken chain against items produced; 281 of 312 kept the chain.

Of 312 items, 281 kept an unbroken chain (90.1%, 95% interval 86.2% to 93.0%). Twenty-two of 140 screenshots had been cropped before attachment to defect reports and the originals overwritten, so the creation hash matched no surviving file. Five of 14 packet captures came from a laptop whose clock was 11 minutes behind the log server; they were intact but could not be placed in sequence. Four detector reports had been reformatted and the raw output deleted.

The fix for screenshots was a capture tool that writes the original to the read-only store and hands the tester a working copy; for captures, a clock check before every run. The 31 broken items stayed in the report, labelled unsupported, since removing them would itself be an undocumented change.

Pitfalls that break the chain

  • Hashing after the fact. A digest computed at archiving proves the state at archiving. Everything before it is unrecorded, and that is the window a challenger asks about.
  • Overwriting the original. Cropping, redacting or filtering in place destroys the item the creation hash refers to. Derived items need their own hash and a surviving parent.
  • Shared accounts and unnamed automation. An entry naming a team account or a generic bot does not answer who. Give each job its own identity and each person their own login.
  • Trusting the summary. A dashboard, a spreadsheet or a formatted PDF is a transformation of the raw output. If the raw file was discarded, the summary rests on nothing.

What to record and how to report it

The report cites items rather than describing them from memory: for each, the identifier, the SHA-256, the creator, the UTC creation time and the storage location, plus the parent hash and transformation for derived items. Attach the custody log, or its hash, and the report's RFC 3161 token or signature. For a provenance check, include the fields listed in a verification session that names its validator. ISO/IEC/IEEE 29119-3 gives this material a place in the test completion report, and the share of items with an intact chain, with denominator and interval, belongs with the metrics a test manager tracks each release.

State the gaps rather than curating them away. The hub for authenticity and detector testing covers the measurements these records protect, and the guide to pushing signed images through every CMS stage shows a fixture run where the custody chain is the whole test.

Common questions

What is a chain of custody for test evidence?

A documented, unbroken record of who held each item of test evidence, when, and what was done to it, backed by a hash computed at creation and re-checked at every step. A reader who distrusts the tester can confirm the item is the bytes the test produced.

Is a SHA-256 hash enough on its own?

No. A hash proves that a set of bytes is unchanged since it was computed, and nothing about when they were created or by whom. It needs the custody log for possession, a synchronised timestamp for sequence, and a third-party time-stamp token on the report.

Do I need a chain of custody for every test run?

Only for runs whose results might be contested: acceptance of a supplier's delivery, a published detector benchmark, a finding against a provenance pipeline, or anything an auditor or a court may see. Decide in the plan; a chain cannot be built later.

What does an RFC 3161 time-stamp actually prove?

A time-stamp authority signs the hash of your document together with the time it received that hash. The token proves the document existed in that exact form at that time, according to a third party, without revealing it. It says nothing about whether the content is correct.

Can automation produce the custody chain?

Most of it. Capture and export tools can hash at creation, the pipeline can append to the custody log under its own identity, storage can enforce write-once, and a job can request time-stamp tokens. Naming the human handler and recording deliberate transformations stay manual.

A chain of custody turns a folder of screenshots, logs and exports into evidence that a supplier, an auditor or a court can check without trusting the person who ran the test. Hash at creation, log every handler, store originals read-only, and time-stamp the report.

Sources

  1. NIST SP 800-86, Guide to Integrating Forensic Techniques into Incident Response
  2. RFC 3161, Internet X.509 Public Key Infrastructure Time-Stamp Protocol (IETF)
  3. ISO/IEC/IEEE 29119-3:2021, Software testing, Part 3: Test documentation
  4. NIST SP 800-92, Guide to Computer Security Log Management

Further reading named in the text

  • Kent, Chevalier, Grance and Dang, Guide to Integrating Forensic Techniques into Incident Response, NIST SP 800-86 (2006)
  • Kent and Souppaya, Guide to Computer Security Log Management, NIST SP 800-92 (2006)

This guide is part of the testing AI systems hub. It is best read alongside evidence-grade test records for authenticity systems and testing a content provenance pipeline, which cover the neighbouring questions.