Trace Dangerous Inputs
Find complete attacker-controlled data paths. Do not report a dangerous API call, suspicious regex match, reflection, or error without proving reachability and impact.
Set a safe review mode
- Identify repository roots, runtime targets, specifications, traffic, authentication context, and authorized scope.
- Default to static tracing when live testing is not explicitly authorized.
- Keep runtime probes low volume, non-destructive, and tied to exact discovered operations. Do not test login credential fields, customer objects, real payment/order flows, or unrelated infrastructure.
- Require a disposable fixture before uploads, persistent content, webhook registration, or other mutations. Define readback and cleanup first.
- Use harmless unique markers, controlled callbacks, safe owned canaries, and low-impact commands only. Never delete data, establish persistence, dump broad files/databases, scan internal networks, or alter cloud resources.
Build the source-to-sink map
Read source-sink-matrix.md. For every candidate path, record:
- entrypoint and exact source: path, query, body, nested field, header, cookie, form, multipart metadata, GraphQL variable, message, file, stored value, or browser source;
- parsing and canonicalization order, including decoding, type coercion, content-type selection, duplicate parameters, archive/document parsing, and redirects;
- validation, allowlisting, authorization, normalization, encoding, parameterization, and sanitization controls;
- transformations and trust-boundary hops across services, queues, jobs, databases, caches, templates, browsers, and third parties;
- final sink, execution context, and output/render/fetch/readback path.
Trace second-order behavior: input stored now may later reach a query, template, browser render, document processor, shell, webhook, or background job.
Prioritize real sinks
Prioritize operations evidenced by code, schemas, JavaScript, or traffic:
- query builders and raw SQL/NoSQL/search expressions;
- shell/process APIs, dynamic evaluation, deserializers, and template engines;
- URL fetchers, redirects, webhooks, integrations, image/document renderers, and import/export jobs;
- XML parsers, file/path/archive operations, upload pipelines, and served-content behavior;
- HTML/DOM/navigation/eval-like browser sinks, postMessage handlers, and cross-origin data access.
Do not send a payload to the application root merely because a field name looks interesting. Preserve the actual method, body, parser, auth/role/tenant context, and provenance.
Validate progressively
For an authorized runtime target:
- Establish a clean baseline and the operation's real success semantics.
- Send a unique inert marker to prove the source reaches the expected context.
- Change one field, encoding, parser, or carrier at a time using a context-specific safe probe.
- Distinguish filter/WAF behavior from application execution.
- Follow the result to the final proof surface: database-derived value, command output, callback, safe file canary, browser runtime effect, persisted readback, internal-service response, or served upload behavior.
- Repeat with a negative control and preserve exact request/action and response/proof artifacts.
If runtime proof is unavailable, report the full reachable code path and missing precondition as a candidate or code-level risk. Do not claim confirmed exploitability.
Apply class-specific proof gates
Read exploitability-proof-gates.md. Enforce the appropriate gate before confirming a finding. In particular:
- require database-derived extraction for SQL injection;
- require browser/runtime JavaScript execution for XSS;
- require exact-sink callback, internal response, metadata, or file/protocol proof for SSRF;
- require command output or controlled callback for command/RCE claims;
- separate upload acceptance from browser, server, or document-processing exploitation.
Keep timing, errors, reflection, status/size differences, accepted files, listener presence, permissive headers, scanner labels, and source-only hypotheses in a candidate ledger until the gate passes.
Review the control at the right layer
For each path, determine whether the defense is structurally correct:
- use parameterized APIs instead of blacklist filtering;
- validate canonicalized data at the authoritative server boundary;
- allowlist URL schemes/hosts and revalidate every redirect and resolved address;
- disable unnecessary parser features and unsafe polymorphic deserialization;
- isolate file storage and processing, generate server-side names, and serve inertly;
- use context-specific output encoding and safe DOM APIs;
- enforce origin and message schema checks before acting on cross-window data.
Search for variants of the same unsafe pattern across the repository after proving one path.
Report proof and coverage
For every confirmed issue, provide source-to-sink path, exact entrypoint, control failure, safe proof, impact, affected variants, remediation location, and reproduction steps. Redact secrets and PII while retaining field names, types, lengths, fingerprints, hashes, and proof signals.
List untraced sources, unexecuted sinks, parser variants, background jobs, browser-only paths, unavailable callbacks, missing disposable fixtures, and other coverage gaps. Do not convert incomplete tracing into a clean result.
1---2name: tahr-trace-dangerous-inputs3description: Trace attacker-controlled input through parsing, validation, normalization, storage, and dangerous server or browser sinks, then safely validate exploitability with class-specific proof gates. Use for injection review, source-to-sink analysis, XSS, SQL/NoSQL injection, command or template injection, SSRF, XXE, path traversal, unsafe deserialization, file upload/processing, webhook, CORS/postMessage, or client-side trust-boundary testing.4---56# Trace Dangerous Inputs78Find complete attacker-controlled data paths. Do not report a dangerous API call, suspicious regex match, reflection, or error without proving reachability and impact.910## Set a safe review mode11121. Identify repository roots, runtime targets, specifications, traffic, authentication context, and authorized scope.132. Default to static tracing when live testing is not explicitly authorized.143. Keep runtime probes low volume, non-destructive, and tied to exact discovered operations. Do not test login credential fields, customer objects, real payment/order flows, or unrelated infrastructure.154. Require a disposable fixture before uploads, persistent content, webhook registration, or other mutations. Define readback and cleanup first.165. Use harmless unique markers, controlled callbacks, safe owned canaries, and low-impact commands only. Never delete data, establish persistence, dump broad files/databases, scan internal networks, or alter cloud resources.1718## Build the source-to-sink map1920Read [source-sink-matrix.md](references/source-sink-matrix.md). For every candidate path, record:2122- entrypoint and exact source: path, query, body, nested field, header, cookie, form, multipart metadata, GraphQL variable, message, file, stored value, or browser source;23- parsing and canonicalization order, including decoding, type coercion, content-type selection, duplicate parameters, archive/document parsing, and redirects;24- validation, allowlisting, authorization, normalization, encoding, parameterization, and sanitization controls;25- transformations and trust-boundary hops across services, queues, jobs, databases, caches, templates, browsers, and third parties;26- final sink, execution context, and output/render/fetch/readback path.2728Trace second-order behavior: input stored now may later reach a query, template, browser render, document processor, shell, webhook, or background job.2930## Prioritize real sinks3132Prioritize operations evidenced by code, schemas, JavaScript, or traffic:3334- query builders and raw SQL/NoSQL/search expressions;35- shell/process APIs, dynamic evaluation, deserializers, and template engines;36- URL fetchers, redirects, webhooks, integrations, image/document renderers, and import/export jobs;37- XML parsers, file/path/archive operations, upload pipelines, and served-content behavior;38- HTML/DOM/navigation/eval-like browser sinks, postMessage handlers, and cross-origin data access.3940Do not send a payload to the application root merely because a field name looks interesting. Preserve the actual method, body, parser, auth/role/tenant context, and provenance.4142## Validate progressively4344For an authorized runtime target:45461. Establish a clean baseline and the operation's real success semantics.472. Send a unique inert marker to prove the source reaches the expected context.483. Change one field, encoding, parser, or carrier at a time using a context-specific safe probe.494. Distinguish filter/WAF behavior from application execution.505. Follow the result to the final proof surface: database-derived value, command output, callback, safe file canary, browser runtime effect, persisted readback, internal-service response, or served upload behavior.516. Repeat with a negative control and preserve exact request/action and response/proof artifacts.5253If runtime proof is unavailable, report the full reachable code path and missing precondition as a candidate or code-level risk. Do not claim confirmed exploitability.5455## Apply class-specific proof gates5657Read [exploitability-proof-gates.md](references/exploitability-proof-gates.md). Enforce the appropriate gate before confirming a finding. In particular:5859- require database-derived extraction for SQL injection;60- require browser/runtime JavaScript execution for XSS;61- require exact-sink callback, internal response, metadata, or file/protocol proof for SSRF;62- require command output or controlled callback for command/RCE claims;63- separate upload acceptance from browser, server, or document-processing exploitation.6465Keep timing, errors, reflection, status/size differences, accepted files, listener presence, permissive headers, scanner labels, and source-only hypotheses in a candidate ledger until the gate passes.6667## Review the control at the right layer6869For each path, determine whether the defense is structurally correct:7071- use parameterized APIs instead of blacklist filtering;72- validate canonicalized data at the authoritative server boundary;73- allowlist URL schemes/hosts and revalidate every redirect and resolved address;74- disable unnecessary parser features and unsafe polymorphic deserialization;75- isolate file storage and processing, generate server-side names, and serve inertly;76- use context-specific output encoding and safe DOM APIs;77- enforce origin and message schema checks before acting on cross-window data.7879Search for variants of the same unsafe pattern across the repository after proving one path.8081## Report proof and coverage8283For every confirmed issue, provide source-to-sink path, exact entrypoint, control failure, safe proof, impact, affected variants, remediation location, and reproduction steps. Redact secrets and PII while retaining field names, types, lengths, fingerprints, hashes, and proof signals.8485List untraced sources, unexecuted sinks, parser variants, background jobs, browser-only paths, unavailable callbacks, missing disposable fixtures, and other coverage gaps. Do not convert incomplete tracing into a clean result.