dnr-respond
它能做什么
这项技能指导对某一条具体安全线索的响应,例如一个警报、一个可疑地址或一次排查的发现。它检查日志、源代码和本地测试,然后提出遏制和修复问题的步骤。适合安全响应人员。
适用场景
- ✓当你收到一条安全警报,需要知道攻击是否成功的时候。
- ✓当你想衡量一次攻击波及了多少用户或系统的时候。
- ✓当你需要一份拟定的响应计划,但不希望智能体去执行它的时候。
技能链接
https://github.com/anthropics/defending-code-reference-harness/blob/main/.claude/skills/dnr-respond/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“你能检查这条可疑登录警报是否导致了一次成功的攻击,以及它扩散的范围吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体在日志中搜索该线索,判断攻击是否成功,在源代码中检查根本原因,然后写出一份计划,供你在执行任何操作之前审阅。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
dnr-respond
Lead-in-hand incident response: take one concrete starting point and answer the four questions an incident commander needs, in order — what happened, did it succeed, how far did it go, and what do we do about it. The output is a verdict, a quantified blast radius, a root cause proven in source, and a response plan that is proposed, never executed.
Invoke with /dnr-respond <lead> [--logs dir] [--repo path] [--fresh].
The lead ($1) can be:
- an incident id from the hunt's
INCIDENTS.json(e.g.INC-2) — the/dnr-hunthandoff - an alert pasted from an alert queue (JSON line or prose)
- an IOC: an IP, an account name, a route, a session identifier
- free text ("a customer says their address was quoted in a phishing email")
Other arguments:
--logs= logs directory or dnr target directory (same resolution as/dnr-hunt; defaults totargets/dnrcanaryif it exists, else cwd).--repo= application source (defaults to the target'sapp/).--fresh= ignore any checkpoint in the run dir's.dnr-respond-state/and mint a new run dir.
Hard rules (shared with /dnr-hunt — the track's contract)
- Log evidence alone never confirms a vulnerability.
confirmed_exploitedrequires log evidence + the flaw in source + a PoC fired locally this session. Otherwise the ceiling issuspected. - Query, don't read. Never
Readorcata log file;wc/head/tailto profile,grep/awk/sort/uniq/python3to interrogate. Small files (alert queues, error logs under ~200 lines) may be read whole. - Propose, never execute. No blocking, disabling, rotating, or config changes — in any environment, including the demo app. The plan names actions; humans execute them.
- Local only. PoCs fire at
127.0.0.1against an instance you started. Never touch a remote host. - Every number is a query result. "How many records" and "how many customers" get answered by pipelines run this session, never estimated.
Run directory and checkpointing
First action — establish the run directory, the same way /dnr-hunt
does, but as a consumer. Let TARGET be the basename of the resolved
--logs/target path (default targets/dnrcanary) and SCOPE that path.
- Lead is
INC-n(the/dnr-hunthandoff, or a second lead from a hunt you already started responding to): work the response into the investigation that incident lives in.{RUN}is the newestresults/TARGET/<timestamp>/directory that contains anINCIDENTS.json— find it with Bash, e.g.ls -1d results/TARGET/*/ | sort -r | while read d; do [ -f "$d/INCIDENTS.json" ] && echo "$d" && break; done. Do not callrundirfor anINC-nlead —rundirmints a fresh empty dir once a prior/dnr-respondin that dir has completed, which would strand the incident'sINCIDENTS.jsonin the old dir. Only if no run dir holds anINCIDENTS.json(you were handedINC-nbut never ran the hunt) fall through to therundirline below. - Any other lead (alert, IOC, free text): Bash
python3 .claude/skills/_lib/checkpoint.py rundir results/TARGET --state .dnr-respond-state --scope "SCOPE"(append--freshif it's in$ARGUMENTS). This adopts the newest run dir for the target if one exists, else mints a freshresults/TARGET/<timestamp>/.
That path is {RUN}; substitute the literal path everywhere below, and
double-quote it (and SCOPE) in Bash.
Checkpoint mechanics are identical to /dnr-hunt, state dir
{RUN}/.dnr-respond-state/, phases 0–4. When {RUN} already holds a
completed .dnr-respond-state from an earlier lead, load reports
complete and the rules below reset it cleanly — a second lead enriches the
same INCIDENTS.json and writes its own RESPONSE-<lead>.md. On start:
python3 .claude/skills/_lib/checkpoint.py load {RUN}/.dnr-respond-state —
absent/complete/--fresh → reset and start at Phase 0; running with
phase_done == N → read phase0.json…phaseN.json, resume at N+1. After
each phase: Write payload to {RUN}/.dnr-respond-state/_chunk.tmp, then
checkpoint.py save {RUN}/.dnr-respond-state <N> <name> --from {RUN}/.dnr-respond-state/_chunk.tmp.
Never write progress.json directly; never pass payload via heredoc/stdin.
After outputs: checkpoint.py done {RUN}/.dnr-respond-state 4.
Phase 0 — Parse the lead, locate inputs
- Resolve
--logs(dnr target config or bare directory) and inventory log fil
常见问题
智能体会自己修复问题吗?
不会。计划只是提议,智能体从不执行。
线索可以是什么?
可以是事件编号、粘贴的警报、地址、账户名称或简短描述。
它和搜索技能是一样的吗?
它遵循相同的规则,但从一条已知线索开始,而不是在没有警报的情况下搜索。
详情
作者的原始描述
Incident response workup for a lead in hand — an alert, an IOC, or a /dnr-hunt finding. Scopes the lead across the logs, verdicts whether the attack succeeded, quantifies blast radius, confirms root cause in source with a local PoC, and writes a proposed (never executed) containment/remediation/recovery plan. Use when asked to "respond to this alert", "work this incident", "how bad is this", or "run dnr-respond". /dnr-hunt is the no-alert entry to the same track.
热度
- GitHub 星标
- 7.7k
- 排名
- #13102
- 许可证
- —
- 更新时间
- 2026/8/6
评论
- …