Defending Code Reference Harness skill
Anthropic's reference set for defending code: threat-model, vuln-scan, triage and patch skills in Claude Code plus an autonomous vulnerability pipeline
- 7,625 ★ on the repository
- Last commit
Broad access
Why this level
- The autonomous pipelines execute the target's code and require a gVisor sandbox
- The customize skill edits pipeline code and runs validation commands
- The skills handle code and vulnerability findings, which are sensitive project data
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/defending-code-reference-harnessDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The autonomous pipelines execute the target's code and require a gVisor sandbox
- The customize skill edits pipeline code and runs validation commands
- The skills handle code and vulnerability findings, which are sensitive project data
This is third-party code. Review the repository files before installing.
What it does
The repository shows how to build vulnerability discovery and remediation with Claude. Interactive Claude Code skills work on files: quickstart guides a first run on a practice target, threat-model prepares a threat model, vuln-scan looks for vulnerabilities, triage sorts findings, patch proposes fixes and customize ports the pipeline to your language and bug class. A separate autonomous pipeline runs recon, find, verify, report and patch; as a reference it targets C and C++ memory bugs with Docker and ASAN. A detection and response track adds the dnr-hunt and dnr-respond skills, which look for an attacker's traces in logs and propose responses.
Who it is for. For security teams and developers who want to build their own vulnerability-finding pipeline on Claude Code or the Claude API.
Good fit when
- You need a threat model for a project to cut scanner false positives
- You have a list of findings that must be sorted and confirmed
- You want to go from a first finding to a fix in a day on the bundled canary target
- You need to port the pipeline from C and C++ to Java or another language with customize
- You suspect an attacker in the logs and want to run a hunt with dnr-hunt
Not a fit when
- You need a managed service: Anthropic offers Claude Security for that
- You need a maintained product: the authors say the repository is unmaintained and takes no contributions
- Running target code is not allowed: the autonomous pipelines execute project code and refuse to run outside a gVisor sandbox
- You need a scanner that works out of the box on any project: the pipeline is a reference
Example request
/quickstart how do I port the pipeline to Java?Limitations
The repository is unmaintained, takes no contributions and lists no license in its metadata. The pipeline is a reference sample and will not work on any codebase without the customize command. The autonomous pipelines vuln-pipeline and dnr-pipeline execute target code, so they run only inside a gVisor sandbox through bin/vp-sandboxed after a one-time setup with setup_sandbox.sh. The interactive skills only read and write files, while customize edits code and runs validation commands. Access to Claude is required, including Bedrock, Vertex or Azure.
How to disable. Delete the cloned repository folder; the skills live in it under .claude/skills. Remove the gVisor sandbox separately if you set it up.
FAQ
Where do I start with Defending Code Reference Harness?
Clone the repository, run claude in its directory and execute /quickstart. The skill guides day one on the canary practice target: threat model, static scan and triage.
Is it safe to run the skills without a sandbox?
The interactive quickstart, threat-model, vuln-scan and triage only read and write files. The autonomous pipelines execute target code and refuse to run outside gVisor without an explicit override.
How does the pipeline differ from Claude Security?
Claude Security is Anthropic's hosted product for multiple projects. The repository is an open reference sample that you adapt yourself.
How do I port the pipeline to another language?
With /customize: it points out which files change for your language, detector and vulnerability class.
What are dnr-hunt and dnr-respond?
Skills of the detection and response track: they look for an attacker's traces in logs, scope the damage and propose responses. The demo target lives in targets/dnrcanary.
Discussion
No questions or reviews yet.
Related
SkillsClaude Code CyberSecurity Skills
Claude Code CyberSecurity Skill Collection
A set of 22 cybersecurity skills for Claude Code: recon, vulnerability assessment, incident response, red and blue team, malware analysis
A skill and command bundle for authorized bug bounty and external red-team work in Claude Code: methodology, chain templates and reports
AgentShield audits the .claude folder for plaintext keys, broad permissions, dangerous hooks and risky MCP servers and grades the setup from A to F
A marketplace of 22 hook plugins for Claude Code: safety, cost control, observability and automation
A pack of about fifty Claude Code subagents for authorized pentesting: planning, recon, exploit research and chaining, post-exploitation, detection and reportin
A security research framework on Claude Code: static analysis, LLM validation of findings, exploits and patches
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Repository stars | Main difference |
|---|---|---|---|
| Defending Code Reference Harness (this entry) | yes | 7,625 | |
| Anthropic Cybersecurity Skills | no | 34,860 | A large third-party library of security skills; this is Anthropic's own reference pipeline |
| Gemini CLI Security Extension | no | 794 | Finds vulnerabilities in branch changes inside Gemini CLI, with no autonomous pipeline |
README in short
The repository is described as a reference implementation of autonomous vulnerability discovery and remediation with Claude, based on work with security teams. It sits next to a blog post and a Cookbook walkthrough. Contents split into Claude Code skills, an autonomous pipeline and a detection and response track. A security block explains which skills only read files and which execute code. Getting started and a list of docs on the pipeline, sandboxing, threat models and patching follow.
README badge
Original SKILL.md
--- name: quickstart description: >- The front door for this repo. With no argument: a 30-second intro, then an offer to walk you through your first run on the canary target. With a question: answers it from this repo's own docs and source, cites where it looked, and hands you the next command. Use for "how do I…", "why does…", "where is…", "can this…", or just "/quickstart" to get oriented. argument-hint: "[question] (blank = 30-sec intro)" allowed-tools: - Read - Glob - Grep - Task - AskUserQuestion --- # /quickstart Two modes, picked by whether `$ARGUMENTS` is empty. - **Empty → Intro mode.** Short orientation, then offer the guided first run. - **Non-empty → Help mode.** Treat `$ARGUMENTS` as the operator's question. --- ## Intro mode Keep it short and a little warm; this is the first thing a new operator sees. Say roughly: > **Welcome!** This repo takes you from finding your first vulnerability to > patching at scale, using a set of Claude Code skills and an autonomous > pipeline. Two ways in: **interactive skills** (no setup, safe, start here) > and the **autonomous pipeline** (Docker, scales to hundreds of parallel > agents). > > The ramp-up: > > | Day 1 | Threat-model + first static scan + triage | > | Day 2 | Run the reference pipeline (C/C++) | > | Day 3-4 | Customize it for your stack | > | Week 2 | Autonomous scanning, triage, and patching | > > Day-1 goal: threat-model, scan, and triage the bundled canary target. > Most teams get there before lunch. Remind them to `export CLAUDE_CODE_SUBAGENT_MODEL=<model-id>` so subagents use the same model as the session. Then **AskUserQuestion** with three options: 1. **Walk me through Day 1 on the canary (~10 min)** → run "Guided first run" below. 2. **I have a question** → ask what it is, then switch to Help mode. 3. **I'll read the README** → point at `README.md` Step 1 and stop. ### Guided first run