/security-agent-skills:reviewing-ai-generated-codefrom security-agent-skills
Security-review discipline for AI-generated code: covers hallucinated dependencies, insecure defaults, propagated vulnerabilities, and plausible-looking code that doesn't do what it claims. Use when reviewing AI-authored changes or large generated diffs.
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.
Model-written code reads well, which is exactly the risk: it is optimized for plausibility, and a reviewer's guard drops when the code is clean and confident. The security failures cluster in predictable places, dependencies that may not exist or may be attacker-registered, defaults copied from insecure examples, validation quietly omitted, and logic that looks right but is not. Reviewing it means aiming at those clusters, not skimming for style.
Review code for projects you own or contribute to with authorization. If you can't name the authorization, stop.
Verify every dependency the code introduces. For each package the change adds, confirm it exists, is the established package (not a lookalike or a name the model may have invented), and is the one you intend. A hallucinated package name an attacker later registers turns "the model suggested it" into installed attacker code. Do not let a plausible import in unverified.
Check the defaults and the omissions. Generated code tends to reproduce the most common pattern, which is often the insecure-by-default one: permissive cross-origin rules, disabled verification, a broad permission, a missing auth check, a hardcoded or example secret, an unparameterized query. Read for what should be there and is not, not only for what is.
Test the claim against the behavior. Model code often states an intent in a comment or a name the code does not fulfill: a function named validate that does not reject, a check that is computed and then ignored, error handling that swallows and continues. Confirm the security-relevant logic actually does what its surface promises.
Look for propagated vulnerable patterns. If the prompt or the surrounding code contained an insecure idiom, the model likely extended it consistently. One confirmed weak pattern is a reason to sweep the whole diff for its siblings, the same way you would hunt variants of any bug.
Check the permissions and scope the code assigns. Generated infrastructure, config, and access code frequently over-grants: a wildcard role, a public bucket, an all-origins rule, a token with more scope than used. Treat every permission the code sets as a claim to minimize, not to accept.
Adjudicate and record. Confirm each issue against the real behavior and the real dependency, exactly as you would a hand-written finding; fluency is not evidence. Record confirmed issues with the minimal fix, and note patterns worth a broader sweep, in the schema.
Confirm. A generated data-access change adds an import for a package whose name is a near-match to a popular one but is not the established package, and configures a client with certificate verification disabled "for simplicity." The import is unverified and the default is insecure. Confirmed,
high, remediation = replace with the verified real dependency, enable verification, and sweep the diff for the same disabled-verification pattern.Kill. A generated function adds input parsing; review confirms every dependency it uses is the intended, established package, the query is parameterized, validation rejects the documented bad inputs (tested), and no permission is widened. It does what its name claims. Killed,
kill_reason= "dependencies verified, validation confirmed by test, no insecure default or over-grant introduced."
You need the generated diff, the ability to resolve and verify each new dependency against a known-good source, and a way to test that the security-relevant logic behaves as named. A call graph over the change helps you find every site of a propagated pattern; the dependency verification and the claim-versus-behavior check are the method.
hunting-supply-chain-risks - the hallucinated-dependency and slopsquatting risk
this review catches at the source.hunting-bug-variants - sweeping the diff for siblings of one confirmed weak
pattern.adjudicating-taint-paths - confirming whether a missing validation is actually
reachable by untrusted input.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