taint_analysis
Track untrusted data flow from sources like HTTP params to dangerous sinks like SQL queries. Reports unsanitized flows with CWE IDs and fix suggestions for data-flow security analysis.
Instructions
Track flow of untrusted data from sources (HTTP params, env vars, file reads) to dangerous sinks (SQL queries, exec, innerHTML, redirects). Framework-aware: knows Express req.params, Laravel $request->input, Django request.GET, FastAPI Query(), etc. Reports unsanitized flows with CWE IDs and fix suggestions. More accurate than pattern-based scanning — traces actual data flow paths. Use for data-flow security analysis. For pattern-based OWASP scanning use scan_security instead. Read-only. Returns JSON: { flows: [{ source, sink, path, sanitized, cwe, suggestion }], total }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | Directory to scan (default: whole project) | |
| sources | No | Filter by source kinds (default: all) | |
| sinks | No | Filter by sink kinds (default: all) | |
| include_sanitized | No | Include flows with sanitizers (default: false) | |
| limit | No | Max flows to return (default: 100) |