QamoosTech
SecurityApplication securityIntermediate

Taint Analysis

PronunciationTAYNT uh-NAL-ih-sis

Definition

Taint analysis follows untrusted data (the source, such as a form field) through the code to dangerous places (the sink, such as a SQL query), and flags paths where it arrives without being cleaned.

Where you hear it

In static analysis security tools (CodeQL, Semgrep, Bandit), secure coding courses and injection bug reviews.

Examples

  • The scanner shows a taint path from request.GET to cursor.execute.
  • Add a sanitizer so the data is no longer tainted.
  • The tool traced the user input from the form to the SQL query and flagged it.

Common mistake

Trusting a scan with no findings. Tools miss dynamic paths; treat it as one layer next to review and tests.

Don't confuse with

Linting, which checks style and general mistakes. Taint analysis focuses on how untrusted data flows.

Say it at work

  • In a meeting or chatDoes CodeQL flag any tainted flows?
  • In an email or ticketMark the function as a sanitizer.