SAST (Static Application Security Testing)
SAST (Static Application Security Testing) is a white-box method that analyzes an application's source code, bytecode, or binaries without running it, tracing how untrusted data flows through the program to find vulnerabilities like SQL injection and cross-site scripting early in development.
SAST examines code at rest. Rather than executing the program, it parses the source (or compiled artifacts) and reasons about its structure, control flow, and data flow to surface security-relevant patterns such as injection, hardcoded secrets, unsafe deserialization, and weak cryptography. Findings map to standards like the OWASP Top 10 and CWE.
Modern SAST engines commonly build an abstract syntax tree (AST) or use pattern matching, then perform taint analysis: they mark data from untrusted sources (HTTP parameters, file input) and follow it to sensitive sinks (a database query, an HTML response). If tainted data reaches a sink without sanitization, the tool reports a potential vulnerability with the source-to-sink path.
Because it needs no running app, SAST fits naturally into IDEs, pre-commit hooks, and CI pipelines, giving developers feedback while the code is fresh. Its main trade-offs are false positives (flagging code paths that are safe in practice) and no visibility into runtime or configuration issues, which is why teams pair it with runtime and dependency scanning.