/security-agent-skills:extracting-nday-from-a-patchfrom security-agent-skills
Infers vulnerabilities from security patches by reading fixes backward, reconstructing pre-patch bugs, and hunting incomplete fixes or variants in the same tree and forks.
Ships in security-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A security fix is a confession. It tells you exactly where the bug was, what the missing check should have been, and, by omission, which other paths the author did not think to cover. Reading a patch backward, from fix to bug, is one of the highest-yield techniques in vulnerability research: the hard part (locating the defect) is already done for you, and the incomplete fixes are waiting.
You may read and reason about public patches and advisories freely. You may only test or exploit against code and systems you are authorized for (your own, OSS you run, CTF, in-scope engagement). Analysis is not authorization to attack.
Read the fix, infer the bug. Look at what the patch adds or tightens, and name the vulnerability it implies. A new length or bounds check implies an out-of-bounds read or write. A new authorization call implies missing access control. A new escape or parameterization implies injection. A new normalization implies traversal or confusion. The added guard tells you the invariant that was being violated.
Locate the pre-patch sink and its precondition. In the vulnerable revision, find the exact operation that was unsafe and the condition under which it misbehaves (the input shape, size, or state the new guard now rejects). This is the bug, stated concretely.
Reconstruct the reachable path. Confirm an untrusted input could reach that sink in the vulnerable version. Because the fix exists, the bug is real by construction; your job is to establish the trigger, not to re-prove the flaw.
Test the fix for completeness. This is the payoff. Ask whether the new guard sits on every path to the sink or only the reported one. Common gaps: the check was added to one caller but a second caller still reaches the sink raw; the check runs after an early operation that is already unsafe; the guard covers one input shape but a sibling shape (a different encoding, a second parameter) slips past. An incomplete fix is a live bug in a patched version.
Hunt variants the patch never touched. Extract the defect's shape and sweep the rest of the tree, sibling modules, vendored copies, and downstream forks for the same mistake in code the fix did not visit. A fix is scoped to one report; the same author's same habit usually recurs.
Adjudicate and record. Each incomplete-fix path and each variant is a lead.
Confirm or kill it on live source and record it in the schema, with commit
set to the revision you adjudicated against and the fix commit noted as the
seed.
Patch. A release adds
if (nmemb > SIZE_MAX / size) return NULL;before an allocation that is then filled by a copy loop.Infer. Pre-patch integer overflow in the size computation leads to an undersized buffer and an out-of-bounds write in the fill loop.
Completeness (confirm). Two other functions compute
nmemb * sizethe same way and allocate without the new check; one is reachable from a parser fed by file input. The fix missed it. Confirmed, incomplete fix,high.Variant (kill). A third site also multiplies, but the operands are a fixed compile-time constant and a bounded enum; no attacker influence and no overflow. Killed,
kill_reason= "both operands bounded and non-attacker-controlled."
You need a way to read two revisions side by side, to establish reachability to a sink in the vulnerable version, and to sweep the tree for the defect's shape. A diff tool plus a structural query (a code property graph or structural search) covers it; on a small change you can trace by hand. The inference in step 1 and the completeness judgment in step 4 are yours; the tools only surface the sites.
hunting-bug-variants - the sweep in steps 4 and 5, generalized.adjudicating-dependency-cve-reachability - when the patched code is a
dependency and you need to know if the pre-fix bug reaches your app.adjudicating-taint-paths - the confirm/kill loop for each reconstructed path.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub unboundcompute/security-agent-skills --plugin security-agent-skills194 skills in this plugin
/adjudicating-dependency-cve-reachabilityDecide whether a CVE in a dependency actually exposes your application before you scramble to patch: is the vulnerable function on a real call path from your code, do the trigger preconditions hold, and can an attacker control the input that reaches it. Use when an advisory, SCA scan, or dependency bot flags a CVE and you must separate a genuine exposure from unreachable noise, or justify why you are or are not affected. Covers pinning the vulnerable symbol, call-path reachability, precondition checks, and taint from your entry points./adjudicating-taint-pathsDecide whether a whitebox lead is a real bug by tracing taint from an untrusted source to a dangerous sink and confirming every hop against live source. Use after a scanner, a candidate list, or your own reading surfaces a "this looks dangerous" sink (SQL exec, system/exec, file open, deserialize, template render, redirect target, memcpy) and you must decide whether attacker- controlled input actually reaches it - or kill the lead with evidence. Covers forward and reverse taint, witness paths, sanitizer analysis, and the evidence rules that separate a finding from a false positive.Other plugins' skills for the same job