Samples — runnable copy of the harness
This folder holds a working copy of the public repository, used as the reference
implementation for the process document and runbooks in
../docs/process/.
samples/
└── defending-code-reference-harness/ ← full source tree (shallow clone, default branch)
Source: anthropics/defending-code-reference-harness (Apache-2.0). Cloned as-is,
minus build/run artifacts (.git/, .codegraph/, graphify-out/, __pycache__/,
.venv/).
Why it's here: every command in the process document and runbooks is written to be
run from inside this folder, against a real target (targets/canary, targets/drlibs,
etc.). Having the real harness/, dnr_harness/, .claude/skills/, docs/, and
targets/ on disk means the commands can be copy-pasted and actually work, instead of
being abstract instructions.
Quick orientation
| Path | What it is |
|---|---|
harness/cli.py |
Entry point for vuln-pipeline — dispatches recon / run / dedup / report / patch. |
dnr_harness/cli.py |
Entry point for dnr-pipeline — the detection & response mirror. |
.claude/skills/ |
The 8 interactive skills (/quickstart, /threat-model, /vuln-scan, /triage, /patch, /dnr-hunt, /dnr-respond, /customize) + contributor-only /verify. |
targets/canary/ |
Deliberately vulnerable demo target — the fast smoke test. |
targets/drlibs/, alsa/, htslib/ |
Real C/C++ libraries for the first autonomous pipeline run. |
targets/dnrcanary/ |
Detection & response demo: Flask storefront + planted-campaign log generator. |
bin/vp-sandboxed |
Wrapper that verifies gVisor + the egress proxy before launching either pipeline. |
scripts/setup_sandbox.sh |
One-time sandbox setup (gVisor, vp-internal network, target images). |
Installing it locally (once, before running any runbook)
cd samples/defending-code-reference-harness
python3 -m venv .venv && .venv/bin/pip install -e .
./scripts/setup_sandbox.sh # gVisor + vp-internal network + proxy + target images; requires Docker
export ANTHROPIC_API_KEY=sk-ant-... # or CLAUDE_CODE_OAUTH_TOKEN, or Bedrock/Vertex env — see agent-sandbox.md
See ../docs/process/runbooks/setup-and-sandbox.md
for the full, verified procedure.
Refreshing this copy
cd samples
rm -rf defending-code-reference-harness
git clone --depth 1 https://github.com/anthropics/defending-code-reference-harness.git defending-code-reference-harness
rm -rf defending-code-reference-harness/.git
Re-run the graph tools afterwards if you want updated diagrams/module-graph data (see
../tool-outputs/gen_module_graph.py and Defending Code Harness Vault/DCRH/DCRH — Graph
Intelligence Findings.md).