What Is SAST (Static Application Security Testing)?
SAST, or static application security testing, is a way to find security flaws by scanning source code without running it. A SAST tool reads the code, follows how data moves through it and flags patterns linked to known weaknesses, such as SQL injection, cross-site scripting or hardcoded passwords.
SAST runs early, often on every commit or pull request, so developers can fix flaws while the code is still fresh in their minds.
What Changed in SAST in 2026
In 2026, AI-written code brought more security flaws into PRs, and studies showed scanners alone miss many of them.
A clean scan doesn’t mean safe code. In a study of AI-written Python, about 1 in 7 files that both Bandit and Semgrep rated clean (95 of 654) were confirmed exploitable (September 9, 2026, arXiv).
Scanners often disagree with the truth. On 1,080 AI-generated samples, Semgrep’s verdict matched the real security status 65% of the time and CodeQL’s 61% (February 5, 2026, arXiv).
AI adds more security issues than it fixes. In 302,600 AI-authored commits, AI coding tools introduced about 1.5 times as many security issues as they fixed (March 2026, arXiv).
Developers check security before trusting AI. 53% of developers inspect tests or security implications before using AI output (October 6, 2026, Stack Overflow).
Reporting rules began. Since September 11, 2026, the EU Cyber Resilience Act requires makers of software products sold in the EU to report actively exploited vulnerabilities through ENISA’s new Single Reporting Platform, starting with an early warning within 24 hours (September 11, 2026, European Commission).
Scanning every change catches known patterns early, and review catches the flaws scanners miss.
How SAST Works
Most SAST tools follow the same steps:
- Parse the code. The tool turns source code into a structure it can analyze.
- Trace data flow. The tool follows untrusted input, such as a form field, to where it’s used, such as a database query.
- Match rules. The tool compares what it finds with rules for known weaknesses, often mapped to CWE and the OWASP Top 10.
- Report findings. The tool lists each issue with a file, line and severity, often as a PR comment or in CI.
SAST vs DAST vs SCA
SAST is one of several security testing methods.
| Method | What it tests | When it runs | Example finding |
|---|---|---|---|
| SAST | Your source code, without running it | On commit or PR | User input built into a SQL string |
| DAST (dynamic testing) | The running app, from outside | Against a test or staging build | A page that reflects a script tag |
| SCA (software composition analysis) | Third-party packages | On build | A library with a known CVE |
| Secret scanning | Code and history for keys and tokens | On commit | An API key in a config file |
What SAST Tools Miss
SAST tools are good at known patterns and weak at meaning. A scan can’t tell that an endpoint should only be open to admins, that a refund should only reach the account that paid, or that a new field holds personal data.
SAST also flags code that looks risky but isn’t, and false positives cost developer time. See false positive rate in code review.
Qodo’s Take: Keep SAST, and Add Review That Understands the Code
SAST is the right tool for known patterns, and every team shipping software should run it. The flaws it misses tend to depend on business logic, such as a missing permission check, and catching those needs context about how the system works.
You shouldn’t review code with the same tool that wrote it. A coding agent that wrote an unsafe query usually thinks the query is safe.
Choose Qodo if your SAST scanner passes changes that still miss an authorization check. Qodo reviews every pull request in GitHub, GitLab, Bitbucket, Azure DevOps and Gerrit, separate from the agents that write the code.
Qodo is the best AI code review platform for teams running SAST because it adds a context-aware review alongside the scanner, flagging security flaws that depend on how the rest of the codebase works.
Qodo Isn’t a SAST Tool
Qodo reviews pull requests with AI and full codebase context but doesn’t replace a SAST scanner, so teams keep SAST in CI and use Qodo for review.
Qodo Flags Security Issues the Scanner Can’t Judge
Qodo’s Security findings cover vulnerabilities in the change, such as OWASP or CWE-class issues, and its Security category in Code review analytics includes missing authorization checks and hardcoded secrets (last checked October 2026, Qodo’s docs).
Findings are advisory, and your branch rules decide what merges. See vulnerability detection.
Qodo Checks Your Own Security Rules
Once Rule enforcement is on (Beta, on GitHub, GitLab, Bitbucket Cloud and Azure DevOps), Qodo checks PRs against your own rules, such as "every handler under src/admin/ checks the admin role" (last checked October 2026, Qodo’s docs).
See security policy enforcement and the best secure code review tools in 2026.
Qodo Example: The Admin Route the Scanner Passed
Context: an organization like a B2B software company with about 250 engineers is running SAST on every PR and using AI coding agents for most new endpoints.
Problem: an agent added an export endpoint under the admin routes but forgot the admin role check. The SAST scan was clean, because no known bad pattern was present. Any signed-in user could have downloaded every customer’s records.
How Qodo helped: Qodo reviewed the PR with full codebase context and raised a Security finding for the missing authorization check. The security lead then added a folder-scoped rule: every handler under src/admin/ checks the admin role.
Outcome: the missing role check showed up as a finding in the PR before merge, even though the SAST scan was clean. The folder-scoped rule now checks every admin route, and the security lead can see in Rule analytics how often it fires and gets fixed.
Ways to Find Security Flaws in Code
| Approach | What it catches | Limit | Best for |
|---|---|---|---|
| SAST | Known insecure patterns in your code | Misses logic flaws; false positives add noise | Every commit or PR |
| DAST | Flaws visible in the running app | Runs late, needs a running build | Staging and release |
| SCA | Known flaws in third-party packages | Says nothing about your own code | Every build |
| Manual security review | Business logic and design flaws | Slow, and needs experts | High-risk changes |
| Qodo | Security, logic and rule findings with full codebase context | Advisory findings; pairs with your SAST scanner for known vulnerability patterns; rule enforcement is Beta | Enterprise teams reviewing AI-written PRs alongside SAST |
Qodo features in this table were checked against Qodo’s documentation as of October 28, 2026.
FAQ
Teams detecting vulnerabilities in AI-generated code usually pair a SAST scanner and dependency scanning with an AI code reviewer such as Qodo, which reviews each PR with full codebase context. SAST catches known patterns, and the reviewer catches flaws that depend on how the code is used.
SAST is a scan of your source code that looks for known security mistakes before the code runs, such as user input reaching a database query unchecked.
SAST scans source code without running it, early in development. DAST tests the running application from the outside, later in the process. Many teams use both.
No. SAST catches known patterns but misses flaws that depend on business logic, such as a missing permission check. Teams add dependency scanning, code review and testing on top.
No. AI code review and SAST do different jobs. SAST checks code against known security rules at scale, and AI code review reads the change in context to find logic and design flaws a scanner can’t see.