/security-agent-skills:hunting-blind-and-second-order-sql-injectionfrom security-agent-skills
Hunts blind SQL injection (boolean/time-based) and second-order injection where stored input is later concatenated into a query on a different code path. Use when a value is stored now and used in a query later, or when a parameter reaches a query with no direct output.
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.
Parameterized queries have made obvious SQL injection rare, but two variants survive because they defeat the usual way people test. Blind injection reaches a real query, but the response returns no error and no data, so a single probe looks inert; the vulnerability is real and confirmable only through an inferential channel, a boolean that flips the response or a deliberate time delay. Second-order injection is subtler: the input is stored correctly and safely on the request that accepts it, then read back later and concatenated into a query on an entirely different code path, so the endpoint that accepts the payload is not the endpoint that is vulnerable. You find both by following stored values to their later query uses and by treating no-output sinks as blind rather than safe.
Test SQL injection only against databases and applications you own or are authorized to assess, on non-production data. A confirming boolean or timing probe still executes against the database and a destructive payload must never be used, so stay inside the authorized boundary. If you can't name the authorization, stop.
Establish every query sink, including the silent ones. Inventory all query construction, and mark the sinks whose responses reveal nothing: background jobs, count-only checks, existence probes, and endpoints that return a fixed status regardless of the row. This is the false-positive killer in reverse: a silent sink is not a safe sink, it is a blind one, and it must be tested inferentially rather than dismissed. Name all sinks, silent ones included.
Follow stored values to their later query uses. For second-order injection, trace each value from the request that stores it to every later read: a profile field, a name, a comment, a cached lookup, a log line re-parsed by a job. At each later read, ask whether the value is concatenated into a query or bound as a parameter. The storing request being safe tells you nothing about the using request.
Confirm parameterization at the actual sink. For each query, blind or second-order, determine whether the untrusted value is a bound parameter or spliced into the SQL text. A value that was escaped for HTML or safe for storage is not therefore safe for a query; the only thing that matters at the sink is whether it is bound. Identifiers and dynamic clauses are never bound and need allowlisting.
Choose the confirmation channel for blind sinks. When the sink returns no data, confirm through a boolean difference (an input that makes a true condition and a false condition produce distinguishable responses) or a timing difference (a conditional delay). These prove the injection without extracting out-of-scope data, and they are the only reliable signal a blind sink gives.
Check the defenses that actually stop it. Parameterized queries at every sink, including background and second-order paths, and allowlisting for any identifier or dynamic clause, remove both variants. A sanitizer applied at input does not, because a stored value can be re-fetched and used raw later, and an escape for one context is wrong for another. Determine whether the actual query sink binds the value.
Confirm and record. Confirm by using the inferential channel in scope: a boolean or timing probe at a blind sink, or storing a benign marker payload and observing it alter a later query's meaning at the second-order sink, without extracting out-of-scope rows. Kill the lead if the query at the actual sink, later or blind, binds the value as a parameter and allowlists any identifier, so no stored or reflected value becomes SQL text. Record the storing path (if any), the query sink, and the inferential evidence.
Confirm. A profile endpoint stores a display name with proper escaping. A nightly analytics job reads display names and concatenates each into a query string to group activity. A name stored with a crafted payload alters that job's query; a boolean-shaped marker makes the job's derived output differ measurably, confirming the injection on the second path. Confirmed second-order SQL injection in the analytics job,
high, remediation = parameterize the job's query so the stored name is bound, never concatenated, and allowlist any identifier the job selects from stored data.Kill. Every query, including the analytics job and the existence-check endpoints that return only a status, binds untrusted values as parameters and allowlists identifiers; a stored marker payload is bound inert at the later sink and a boolean probe at the silent endpoint produces no distinguishable difference. Killed,
kill_reason= "all sinks including second-order and blind paths bind values as parameters and allowlist identifiers; no stored or reflected value becomes SQL text and inferential probes show no signal."
You need every query sink including silent ones, the storage-to-use paths for values that are stored and later queried, and whether each actual sink binds the value or allowlists an identifier. For each stored value, follow it to every later query; for each silent sink, plan a boolean or timing confirmation. Reading the sink shows whether the value is bound; an inferential probe or a stored marker shows whether a blind or second-order path is live.
hunting-orm-and-query-builder-injection - the raw-method and identifier escape hatches there are common
second-order sinks when a stored value flows into them later.hunting-nosql-operator-and-where-injection - the document-store analog, where the same stored-then-used
path applies to operator injection.adjudicating-taint-paths - use it to connect a storing request to a distant query sink across code paths
and jobs.writing-vuln-reports - blind and second-order findings need a precise inferential-evidence writeup; use
it to record the boolean or timing channel clearly.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./auditing-account-abstraction-and-paymaster-trustAudit an ERC-4337 account-abstraction deployment for trust misplaced in the user-operation lifecycle: a smart account whose validation accepts a signature or nonce it should reject, a paymaster that agrees to sponsor gas for operations it should not so an attacker drains its deposit, a bundler or entry-point assumption that lets a user operation be replayed or reordered for gain, and validation logic that reads mutable state or reaches outside its allowed scope. Covers smart-contract wallets, paymasters, bundlers, and the entry point in an account-abstraction stack where a user operation is validated and sponsored before it executes. Use when a user operation is validated, paid for, and executed by separate parties and that trust split is the boundary. The crafted user operation is the source, the drained paymaster or unauthorized execution is the sink, and the over-permissive validation or sponsorship rule is the bug./auditing-account-recovery-and-reset-trustAudit password reset and account recovery flows for the trust that lets an attacker take over an account: a reset token that is guessable, long-lived, reusable, or not bound to the account it was issued for, a recovery path that verifies a weaker factor than login and bypasses multi-factor, a reset link whose host comes from an attacker-controllable header so the token leaks, and a recovery that trusts an unverified email or phone change to redirect the reset. Covers the recovery surface of authentication systems, where resetting a credential or recovering access is the alternate door into an account. Use when an application offers password reset or account recovery and that flow is a path to authentication. The attacker-driven recovery request is the source, the account it takes over is the sink, and the weak token, bypassed factor, or leaked reset link that grants it is the bug./auditing-admission-control-policy-gapsAudit cluster admission control for gaps that let a non-compliant or hostile workload through: a validating webhook that fails open when its backend is unreachable, a policy that scopes by namespace or label and misses the namespaces that matter, a mutating webhook whose changes are trusted downstream, and an ordering or exemption that lets a privileged pod bypass the checks meant to stop it. Covers Kubernetes admission webhooks and policy engines that are supposed to enforce workload security at create and update time. Use when admission policies are the control that keeps privileged, unsigned, or over-permissioned workloads out of the cluster. The workload submitted for admission is the source, the admitted resource is the sink, and the policy gap that let it through is the bug./auditing-ai-agent-permissionsAudit what an AI agent is actually allowed to do versus what its task needs. Covers excessive agency (tools, scopes, and autonomy beyond the job), missing human-in-the-loop gates on irreversible actions, over-broad credentials and their blast radius, sandbox and code-interpreter escape, unfiltered egress, and unbounded resource or spend (denial-of-wallet). Use when granting an agent a tool or scope, reviewing an agent's permission posture, or deciding which actions need approval. The model's restraint is not a control; permissions are.Other plugins' skills for the same job