Glossary · Scanning and analysis

Taint analysis

Taint analysis is a static analysis technique that marks data from an untrusted source, such as a web request, as tainted and follows it through the program to a sensitive call (a sink), reporting a flaw when it arrives there without passing a sanitizer.

A pattern rule flags a call that looks dangerous wherever it appears. A taint rule flags it only when attacker-controlled data reaches it, which is how injection flaws (CWE-89 SQL injection, CWE-78 OS command injection and the like) are told apart from the same call fed a constant. Taint analysis can still miss flows that pass through code it cannot see, and it can report a flow a human knows is safe.

How TrustIvan relates to it

TrustIvan's first-party SAST ruleset includes taint rules that follow web request input to SQL, shell, file, network, HTML and deserialization sinks. The SAST rules pages say which rules are taint rules; the count is on the catalogue's static analysis page. Static analysis is off until an operator turns it on.

Related terms

On the platform: Code Security. Checks: SAST rules. All glossary terms

See TrustIvan on your own estate.

Book thirty minutes with an engineer and bring an image, a repository or a cloud account, or start free on the hosted service.