/security-agent-skills:hunting-redos-and-complexity-dosfrom security-agent-skills
Hunts single-request denial of service from super-linear work: backtracking regex, quadratic algorithms, and hash flooding. Use when reviewing code where untrusted input reaches expensive operations without size or complexity guards.
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.
Most denial of service is discussed as flooding: many requests exhausting a pool. The quieter and more dangerous kind is a single small request that pins a CPU core for seconds or minutes, because somewhere the work grows faster than the input. A regular expression with an ambiguous quantifier, a loop that is accidentally quadratic, a parser with no depth limit, or a hash table fed attacker-chosen keys all turn a few kilobytes of input into a stall that a timeout may not even interrupt. You find these by tracing untrusted input to any operation whose cost is super-linear and asking whether anything bounds the work before it runs.
Drive worst-case input only against systems you own or are authorized to test, and coordinate: a confirmed complexity bug can take a shared service offline. Measure on a target and load where a stall is acceptable. If you can't name the authorization, stop.
Map untrusted input to expensive operations. Inventory where request-controlled strings, collections, or numbers reach a regular expression, a recursive or backtracking parser, a nested loop over input, a sort or dedup, or a hash-keyed collection. These are the operations whose cost can grow faster than linearly in the size of the input, so these are where a small request buys disproportionate work.
Find the super-linear regular expressions. Read each expression that touches untrusted input
for the backtracking shapes: a quantified group inside another quantifier such as (a+)+,
overlapping alternation under a quantifier such as (a|a)*, and a quantified class followed by a
character the class can also match. On an input that almost matches and then fails at the end, the
engine explores exponentially or polynomially many paths. A crafted string of a few kilobytes can
run for seconds.
Find the quadratic and worse algorithms. Look for cost that is super-linear in input size with no cap: an accidental nested scan over an attacker-sized list, string building by repeated concatenation in a loop, a parser with no depth or length limit, or repeated membership checks against a growing list. The attacker controls the size, so the attacker controls the cost.
Find the hash-flooding sinks. Look for maps, sets, dedup, or grouping built from attacker-chosen keys. If the hash function is predictable and unseeded, an attacker who submits many colliding keys collapses average constant-time operations into worst-case linear ones, making the whole build quadratic in the number of entries they send.
Check for a guard between source and sink. Determine whether input length, collection size, nesting depth, or a total-work budget is enforced before the expensive operation, and whether the operation runs under a timeout that actually preempts it. A length check that runs after the regex has already backtracked, or a timeout that cannot interrupt a busy CPU loop, is not a guard.
Confirm and record. Confirm by driving the operation with a crafted worst-case input in scope and measuring the time or CPU it burns against a normal input of the same size. Kill the lead if input is tightly bounded before the operation, the expressions carry no ambiguous backtracking shape, the algorithms are linear or capped, hash keys are seeded or not attacker-chosen, and an enforced timeout preempts the work. Record with the input, the operation, and the observed cost.
Confirm. A profile field is validated by a regular expression with a nested quantifier applied before any length limit. A submitted value of a few kilobytes of a repeated character followed by a non-matching byte makes the request thread run for over thirty seconds at full CPU; a handful of concurrent submissions saturate every worker. Confirmed regular-expression denial of service,
high, remediation = bound the field length before matching, rewrite the expression to remove the ambiguous quantifier or use a non-backtracking engine, and enforce a preempting time budget.Kill. The same field is capped to a small maximum length before it is ever matched, the expression has no nested or overlapping quantifier, the surrounding parsing is linear with a depth limit, hash-keyed structures are seeded per process, and the request runs under a budget that interrupts it. Worst-case input finishes in the same time as normal input. Killed,
kill_reason= "input length bounded before a non-ambiguous expression, linear capped parsing, seeded hashing, preempting time budget; crafted input shows no super-linear cost."
You need the set of places untrusted input reaches a regular expression, a parser, a super-linear algorithm, or a hash-keyed structure, the exact expressions and loops involved, and the guards (length, depth, size, time budget, hash seeding) that run before each. For each, ask what a crafted worst-case input costs and whether anything bounds it in time. Reading the code tells you the shape; measuring a crafted input against a normal one of the same size tells you whether the cost is super-linear in practice.
auditing-graphql-attack-surface - query depth and cost amplification is the same single-request
denial of service one layer up, at the query planner.hunting-business-logic-flaws - an unbounded expensive operation is a resource the logic forgot to
meter; both hunt for a missing limit.detecting-race-conditions - a sibling resource-and-timing class where the bug is in how work is
scheduled rather than how much of it runs.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