lh-code-auditlisted
Install: claude install-skill jrodrigopuca/local-agents
## Critical Patterns
### 1. Read like an attacker: follow tainted data, not the control flow
Don't read the code the way it runs — read the way data ENTERS and chase it.
Trace every input from its source (the door) to its sinks (query, command,
HTML, filesystem, response). A vulnerability is tainted data reaching a
dangerous sink without a sanitizing gate in between. `rg` the sinks first
(query builders, `exec`, `innerHTML`/`dangerouslySetInnerHTML`, `eval`, file ops,
deserializers), then walk backwards to see if attacker-controlled data can
reach them. Where an LLM sits in the flow, its output is tainted by
everything it read, so treat it as a SOURCE, and treat every tool or query
the model can invoke as a sink: the audit question is whether content the
model ingested can steer a call the user never made
([data-ml/lh-llm-integration](../../../data-ml/skills/lh-llm-integration/SKILL.md)
bounds the call; you audit what it can reach).
### 2. The high-yield vulnerability classes (audit in this order of ROI)
| Class | The question | Where it hides |
|-------|--------------|----------------|
| Broken authorization (IDOR/authz) | Can user A act on user B's object? | Endpoints that take an ID and skip the "is it YOURS?" check |
| Injection (SQL/NoSQL/cmd/LDAP) | Does input reach an interpreter unparameterized? | String-built queries, shelled-out commands, dynamic eval |
| Broken authentication | Can I skip/forge/replay the identity check? | Token validation, session fixation, we