process-operate-dcrh

docs / process / process-operate-dcrh

← all docs

Process Document: Operate DCRH (Scan → Triage → Remediate)

Owner: AppSec / Security Engineering team operating the harness | Last Updated: 2026-08-14 | Review Cadence: Quarterly, or after any upstream change to anthropics/defending-code-reference-harness

Verified against the runnable copy in ../../samples/defending-code-reference-harness/ — every CLI flag below was checked against harness/cli.py's argparse definitions, not recalled from the README.

Purpose

Give a security team a repeatable procedure for using DCRH to find, verify, and fix memory-safety bugs in a C/C++ target — from first threat model through a verified patch — without re-deriving the workflow from source each time. DCRH itself is a reference implementation, not a product: this document is what turns that reference into an operable team process.

Scope

In scope: the static/memory-safety track (/threat-model, /vuln-scan, /triage, vuln-pipeline, /patch) run against a target directory under targets/<name>/ with a Dockerfile. Out of scope: the detection & response track (dnr-pipeline, /dnr-hunt, /dnr-respond) — that has its own scope and target shape (log corpora, not source) and deserves a separate process document if adopted; /customize (porting the pipeline to a new stack) is a one-time engineering task, not a recurring operational process.

RACI Matrix

Step Responsible Accountable Consulted Informed
Threat model the target Security analyst AppSec lead Target's engineering owner Security engineering team
Static scan + triage Security analyst AppSec lead — Target's engineering owner
Autonomous pipeline run (find/grade/report) Security engineer (sandbox operator) AppSec lead Infra/platform team (Docker/gVisor host) Security analyst
Patch generation + verification Security engineer AppSec lead Target's engineering owner (for upstream-ability) Security analyst
Review + apply patch Target's engineering owner Engineering manager Security engineer AppSec lead
Sandbox setup & credential rotation Security engineer (sandbox operator) AppSec lead Infra/platform team Security engineering team

Process Flow

 ┌─────────────┐   ┌──────────────┐   ┌────────────────┐   ┌───────────────┐   ┌──────────┐
 │ 1. Threat   │──▶│ 2. Scan       │──▶│ 3. Triage       │──▶│ 4. Patch       │──▶│ 5. Act   │
 │    model    │   │ (static or    │   │ (verify+dedupe+ │   │ (draft+grade   │   │ on       │
 │             │   │  pipeline)    │   │  rank)          │   │  fix)          │   │ verdict  │
 └─────────────┘   └──────────────┘   └────────────────┘   └───────────────┘   └──────────┘
        │                  │                                                          │
        │                  └── autonomous path branches to Setup & Sandbox first ──┐  │
        ▼                                                                          ▼  ▼
   THREAT_MODEL.md                                                        results/<target>/<ts>/   PATCHES/

Detailed Steps

Step 1: Threat model the target

Step 2: Scan — static or execution-verified

Step 3: Triage — verify, dedupe, rank

Step 4: Patch — draft and adversarially grade a fix

Step 5: Act on the verdict

Exceptions and Edge Cases

Scenario What to Do
/triage dismisses all findings on targets/canary Expected — canary's entry.c announces itself as deliberately vulnerable demo/test code, and /triage correctly excludes test fixtures. To see the full confirm/dedupe/FP flow, run /triage against the provided curated fixture (.claude/skills/triage/fixtures/canary-findings.json --repo targets/canary) instead.
A pipeline batch is killed mid-run Resumable: bin/vp-sandboxed run <target> --runs N --resume <results-dir> with the same --runs N the batch was launched with — skips runs whose result.json reached a terminal state, retries agent_failed/build_failed/error ones. See Troubleshooting in the upstream docs.
A run hits error_max_turns Not resumable by design (resuming would multiply the turn cap). Any crash submitted before the cap is still salvaged and graded; raise --max-turns and start a fresh run for the rest.
Target's build needs internet access mid-scan Should not happen by design — the setup/attack split means all internet-needing work (dependency install, compile) happens during the Docker build, before the agent container is created on the egress-restricted network. If it's happening, the target's Dockerfile likely fetches something at runtime — fix the Dockerfile, don't loosen the sandbox.
A finding looks severe but the target's SECURITY.md rules it out of scope Record it in the threat model as a documented, accepted risk rather than re-litigating it every scan; don't let /triage keep re-surfacing it — add to known_bugs.
Using a non-default ANTHROPIC_BASE_URL or Bedrock/Vertex The default egress allowlist only permits api.anthropic.com:443. Set VP_EGRESS_ALLOW before running scripts/setup_sandbox.sh (see setup-and-sandbox.md) — changing it later requires re-running setup, which drops any live agent connections, so do it between batches.

Metrics

Metric Target How to Measure
Time from scan start to first verified report < a few hours for a --runs 3 wave Timestamp on results/<target>/<ts>/ vs. first reports/bug_NN/report.json
False-positive rate (static track) Decreasing over successive threat-model iterations /triage's dismissed-vs-confirmed ratio per run
Verified-fix rate Track, don't over-target — some findings aren't upstreamable Count of PatchVerdict passes vs. total findings patched
Token burn per agent ~10K uncached input / ~2K output TPM (repo's own sizing rule) Sum usage blocks in run_NNN/ transcripts
Recurrence rate Bugs a subsequent pipeline wave re-finds after a claimed fix Compare found_bugs.jsonl across successive batches on the same target