/security-agent-skills:hunting-bugs-with-a-code-graphfrom security-agent-skills
Hunts security bugs across a codebase by reasoning over call graph and dataflow structure rather than keyword grepping. Useful for systematic coverage of a bug taxonomy on authorized source code.
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.
Grep finds strings; it misses the caller behind a rename, an alias, or an import
indirection, and it cannot answer "what can flow into this argument." Reasoning
over a codebase's structure - its call graph and dataflow - can. This skill is
the master loop for a source-level hunt. Two companions go deeper on single
moves: adjudicating-taint-paths (lead → decided finding) and
auditing-guard-gaps (the unguarded peer of a guarded function).
Only run on code you're authorized to analyze: your own, an OSS project you contribute to, a CTF, or an engagement where source review is in scope. If you can't name why you're allowed to read this source, stop.
Index the target. Build a structural index of the source tree. It is a snapshot - re-index whenever the code changes in a way that matters, or you will adjudicate against stale structure.
Orient before hunting. Start from the most-connected functions - the structural spine, where input arrives and trust boundaries sit - not from a file you happened to open. Map the top-level entry points and the module layout before drilling in.
Enumerate the whole taxonomy - never one family. List every bug class your catalog covers before examining any single one. Do not scope the hunt to the class you expect (injection, memory copy, whatever) because it's familiar. Coverage is over the whole taxonomy; a hunt that only ever looks at one family is not a hunt, it's a confirmation of a hunch.
Rank is triage, not a filter. A ranked lead list orders your attention. Inclusion is exhaustive; a low rank never justifies dropping a candidate from examination. Work down the list - don't truncate it.
Leads are facts, not verdicts. A lead means "the structure here matches a
known-dangerous shape," never "this is a bug." Adjudicate each by tracing its
source→sink provenance and confirming against live source. Only survivors are
findings. (→ adjudicating-taint-paths.)
Diff guarded against unguarded peers. When one function validates before a
sink and a sibling reaching the same sink does not, the sibling is the bug.
(→ auditing-guard-gaps.)
Record coverage honestly. Emit every decided finding in the shared
finding schema, including killed leads. Then state
what the taxonomy did not cover. Temporal/lifetime classes (use-after-free,
double-free), integer-overflow-as-a-class, and uninitialized/NULL deref are
commonly not modeled as catalog families - hunt those with
detecting-memory-safety-bugs and detecting-race-conditions. An empty result
over a partial taxonomy is not "the code is clean"; say which classes were out
of scope of the catalog versus genuinely checked and clean.
Cold start on a Python web service.
- Orient: the spine surfaces
app.dispatchand three request handlers as the highest-traffic nodes - that's where untrusted input lands.- Enumerate taxonomy: catalog lists path-traversal, injection, SSRF, open- redirect, deserialization, missing-authz (and flags memory/temporal classes as not modeled).
- Work each family; in path-traversal the lead is
export.filename → open().- Adjudicate: trace shows no normalization between source and sink → confirmed, emitted per the schema (see the schema's worked record).
- Guard audit:
delete_own_postchecks ownership; peeradmin_bulk_deletereaches the same delete sink with no ownership check → second finding.- Report: 2 confirmed, 4 families clean, memory/temporal classes flagged out-of-catalog and handed to the dedicated skills.
Shortcuts that cause misses and false positives - refuse them:
Run the loop with whatever structural tooling you have. At minimum you need something that answers, from a real parse rather than text matching: who calls a function, what a value can flow into, and the exact source of a declaration. A code property graph gives you all three; a good static analyzer covers much of it; careful manual tracing covers the rest on a small target. Whatever you use, keep the snapshot caveat - re-index after the source changes.
adjudicating-taint-paths - confirm or kill a source→sink lead.auditing-guard-gaps - find the unguarded peer of a guarded function.detecting-memory-safety-bugs, detecting-race-conditions - the classes a
catalog usually doesn't model.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
code-graph, call-graph, dataflow-analysis, bug-hunting, source-audit
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