Why AI SAST needs its own operating playbook
AI SAST combines large language model reasoning with static analysis. It reads code the way a security engineer would, tracing how data moves and asking whether a flaw can be exploited. If you want the full definition first, start with our guide to what AI SAST is and how it works.
Running AI SAST differs from running legacy SAST because of where the code comes from. AI assistants and coding agents now write a large and growing share of production code. That code carries the same vulnerability patterns developers have always written, and it arrives faster than human reviewers or rule-based scanners can keep up with. Legacy SAST already buried AppSec teams in low-confidence findings while missing logic flaws like IDORs and authentication bypasses. Pointing the same operating model at far more code makes both problems worse.
This post covers how to operate AI SAST once you've adopted it: where to run it, how far to trust its verdicts, how to set policy, how to guide coding agents, and how to prove it's working. If you're still choosing a tool, start with our guide to comparing SAST tools, then come back here.
1. Phase in AI SAST, starting where risk is highest
Why it matters
A new scanner that blocks dozens of pull requests in its first week teaches developers to resent it. A phased rollout lets your team see accurate findings before enforcement starts, and it gives you a baseline to measure against later.
Some scanner outputs are confirmed vulnerabilities, some aren't, and your team decides which categories are serious enough to stop a merge. How to do it
Pick the first repositories by exposure and impact:
- Internet-facing services and public APIs
- Code paths that touch payment data, personal data, credentials, or regulated records
- Languages where legacy SAST has struggled, such as C and C++, where memory-safety bugs can lead to remote code execution
On four real-world embedded C projects in one customer codebase, Endor Labs AI SAST caught 96 of 102 known vulnerabilities, 48x the result of the next closest buildless pattern-based SAST tool.
Then phase in enforcement:
- Weeks 1 to 2: run monitor-only across the selected repositories. Treat the existing backlog as its own workstream with its own owners and timeline. Record your baseline metrics (see practice 9).
- Weeks 3 to 6: comment on pull requests for new code. Developers see findings with evidence attached, and nothing blocks yet.
- After week 6: block merges only for a short list of high-confidence, evidence-backed finding types your security and engineering leads agree on. SQL injection with a confirmed source-to-sink path is a reasonable first entry.
- Ongoing: widen the blocking list based on developer feedback and override data.
Developers shouldn't fail a PR because of a flaw someone else wrote three years ago.
2. Run AI SAST in the IDE, the agent loop, and the pull request
Why it matters
Developers file feedback that lands in next week’s report. They fix feedback that lands in the editor or agent session. The cost of a fix rises every time the code moves further from the person or agent who wrote it.
This matters more with coding agents. An agent that gets a finding mid-task can correct its own output before a human ever reviews the diff. A scan that runs after the build can only send the work back.
How to do it
Layer your checks so each one catches what the earlier one missed:
- In the IDE and at pre-commit, run fast checks on the code being written. Developers see issues before they push.
- Inside the coding agent loop, give the agent direct access to security analysis so it can check and fix its own changes before it hands them off.
- On the pull request, run the full analysis as the backstop. Post findings as PR comments with the data flow, the impact, and a proposed fix.
Treat all three layers as continuous feedback. The PR check is where your agreed blocking rules apply, but most issues should never reach it. For the developer-side steps, see our guide on how to secure AI-generated code in a developer's workflow.
AURI by Endor Labs is a security harness for agentic software development. It plugs into coding agents and developer tools through Hooks, Skills, MCP, CLI, and API, so AURI's checks run inside the agent loop and the IDE. Endor Labs AI SAST runs buildless, which means it scans in the IDE and on the PR without waiting for a successful build.
3. Give the scanner full-repository context
Why it matters
An authorization check or a sanitizer three files away decides whether a flagged line is exploitable. A diff-only scan can't see it. That produces two kinds of error: false positives where a guard exists out of view, and missed vulnerabilities where tainted data crosses a file boundary the scanner never followed.
Many of the flaws that matter most, such as broken access control and insecure design, only show up when you look at how components interact.
How to do it
Connect the whole repository to the scanner, even when you only report on the diff. Make sure the analysis can see:
- Framework conventions, such as routing, middleware, and dependency injection, that decide which code is reachable from a request
- Configuration files that turn security controls on or off
- Generated code and shared libraries that sit between sources and sinks
- Call relationships across modules, so source-to-sink tracing doesn't stop at a file boundary
Scope the report to new code. Scope the analysis to everything.
Endor Labs AI SAST builds on the Endor Labs Code API, a semantic model of your application with callgraphs and dataflow, and on a patented code context graph that models application behavior with line-level detail. Agents query that model instead of reading whole files, so Endor Labs AI SAST never dumps your entire codebase into an LLM. That keeps costs contained at enterprise scale. Languages with Code API support, including C, C#, Go, Java, JavaScript, and Kotlin, get faster and cheaper scans.
4. Pair LLM reasoning with deterministic program analysis
Why it matters
An LLM on its own is a poor scanner. Its output can vary from run to run on the same code. It can hallucinate a data flow that doesn't exist. And it responds to suggestion: a code comment reading // input already sanitized upstream can be enough to talk an LLM out of a real finding.
Deterministic program analysis gives you repeatable results. The same code produces the same dataflow graph every time, and no comment can argue a tainted path out of existence. LLM reasoning adds what rules can't express, such as business logic and authorization intent. You want both.
The AI layer is part of your attack surface
Any AI step in your pipeline reads untrusted input. Pull request descriptions, code comments, docstrings, and test fixtures can all carry prompt injection aimed at the AI review step. An attacker who can open a PR can try to instruct the reviewer to approve it or to mark a finding as safe.
Protect the AI layer the way you'd protect any service that processes untrusted input:
- Run AI review and triage steps without access to secrets
- Give them no write permissions to the repository, the pipeline, or the issue tracker
- Treat any AI verdict that dismisses a finding as a claim that deterministic evidence must support
- Log the inputs and outputs of AI steps so you can audit a suspicious dismissal later
The OWASP LLM Prompt Injection Prevention Cheat Sheet covers input handling and privilege separation patterns you can apply to these steps.
How to do it
Ask how your AI SAST tool divides the work. Detection should rest on program analysis that traces real paths through the code. LLM reasoning should add context and judgment on top of that evidence. A finding should never depend only on what a model said.
Endor Labs AI SAST orchestrates multiple specialized agents. They combine rule-based pattern matching, dataflow tracing, and multi-pass LLM reasoning. Detection agents trace user-controlled data from source to sink across files. Triage agents classify every finding as true positive, false positive, or unknown. Remediation agents propose context-aware fixes. In the June 2026 GA benchmark, this approach surfaced 3x more real vulnerabilities than frontier models, including business logic and access control flaws rule-based SAST can't express. AI SAST that thinks like a security engineer covers the architecture in more depth.
5. Demand evidence for every finding
Why it matters
Legacy SAST trained a generation of developers to ignore findings. When most alerts turn out to be noise, people close the real ones with the rest. Evidence reverses that. A developer who can see the exact path from an HTTP parameter to a SQL query doesn't need persuading.
Evidence also matters for audit to show why a finding was fixed, deferred, or dismissed.
How to do it
Set a standard: no finding reaches a developer without these pieces.
- Source-to-sink data flow, showing where untrusted data enters and where it lands
- The call path that connects them
- Reachability, confirming the vulnerable code runs from an entry point
- An exploitability rationale explaining what an attacker could do and what conditions they'd need
Then decide what happens to each triage verdict:
- True positives go to the owning team with the evidence and a proposed fix.
- Suppress false positives and record the reason.. Every suppression stays searchable and reviewable, so someone can find and reverse a wrong dismissal.
- Unknown verdicts go to a named human reviewer with a service-level target, for example two business days. Don't auto-suppress them, and don't send them to developers as confirmed issues. Unknowns are where false negatives hide if nobody owns them.
Endor Labs attaches verifiable evidence to every finding: data flow, call paths, and reachability proof. That evidence is what lets Endor Labs AI SAST deliver up to 95% false positive reduction without hiding how it reached each verdict.
6. Tune policies to what your organization cares about
Why it matters
An injection flaw in an internal admin tool behind SSO and the same flaw in a public payments API aren't the same priority. Raw severity scores treat them identically. Policy is how you encode the difference, so developers see the issues that matter to your business first.
How to do it
Write down your risk appetite and turn it into ranking rules:
- Weight findings by exposure. Internet-facing code outranks internal tooling.
- Weight by data sensitivity. Code that touches payment, health, or credential data moves up.
- Weight by regulatory scope. Systems covered by audit requirements get tighter service-level targets.
- Add organization-specific rules. If your company has a shared authorization service or a shared crypto library, flag code that bypasses it, even when the bypass looks safe in isolation.
Review the rules each quarter with both security and engineering leads in the room. Endor Labs AI SAST learns your organization's context and applies it to triage. The details are in how Endor Labs AI SAST learns what matters to your organization.
7. Put guardrails around AI coding assistants and agents
Why it matters
Coding agents produce code at volume. They drift from your reference architectures when they lack context. They sometimes suggest dependencies that don't exist, which attackers can register and fill with malicious code. They also take actions, like running commands and editing configuration, that go beyond the code they write.
Good guardrails let agents move fast inside boundaries you've defined. They make agents more useful, because their output needs less rework.
How to do it
Give agents your standards in the files they already read:
- AGENTS.md
- CLAUDE.md
- .github/copilot-instructions.md
- Cursor rules
Put concrete requirements there. Name your approved authorization helper, your parameterized query pattern, and your rules for handling secrets. Vague instructions like "write secure code" don't change agent behavior.
Instruction files guide the agent, but the agent can ignore them. Back them with deterministic checks the agent can't override: AI SAST on its output, dependency verification on every package it adds, and secrets scanning before commit. Scope agent permissions so an agent can't push to protected branches or change pipeline configuration on its own.
Close the loop with a lightweight root-cause review when a finding type keeps recurring. Ask three questions. Were security requirements missing? Was a shared security service unclear or hard to find? Did the agent lack context it needed? Feed the answer back into the instruction files and into a deterministic rule.
For the detection limits behind these guardrails, see what static analysis catches and misses in AI-generated code. Endor Labs Coding Agent Governance secures the actions coding agents take alongside the code they produce, from a unified control plane.
8. Keep humans in the loop on auto-fix
Why it matters
AI-generated fixes can cut remediation time sharply. An unreviewed AI fix, though, is more unreviewed AI code entering your repository. A patch that closes one injection path can break input validation elsewhere or change behavior a test didn't cover.
How to do it
- Deliver fixes as reviewable diffs in the pull request, next to the finding they address.
- Re-scan the patched code and run the test suite before anyone accepts the change. A fix should close the original source-to-sink path without opening a new one.
- Keep ownership with the team that merges the change. Whoever accepts the fix owns it, the same as any other code.
- Track how often developers accept, edit, or reject proposed fixes. Frequent edits on one fix type tell you where the remediation logic needs tuning.
Endor Labs AI Security Review runs the AI SAST engine on every pull request. It confirms which vulnerabilities are exploitable and ships a context-aware fix with each one, so developers close real issues before merge while keeping the final call.
9. Measure false positive rate, MTTR, and fix rate
Why it matters
Without numbers, a rollout lives or dies on anecdotes. A baseline taken before rollout lets you show leadership what changed, and it helps you spot when AI triage starts to drift.
How to do it
Collect these metrics for two to four weeks before you turn on AI SAST, then track them every month:
- False positive rate: findings marked false positive divided by all findings triaged in the period. Count developer dismissals, not only security team decisions.
- Mean time to remediate (MTTR): the average time from when a finding is created to when a verified fix merges. Report it separately for each severity tier.
- Fix rate: confirmed findings fixed in the period divided by confirmed findings opened in the period. A rate under 100% means the backlog is growing.
- Blocked PR rate: pull requests blocked by a security check divided by all pull requests. Watch it closely during phased enforcement.
- Override rate: AI triage verdicts that a human reverses, divided by AI verdicts reviewed. Split it by direction. True positives overturned to false point to over-flagging. False positives overturned to true point to over-dismissal, which is the more dangerous drift.
As reference results, Endor Labs customers see 83% fewer blocked PRs, 6x faster remediation, and 10x fewer security tickets.
For audit reporting, map these metrics to the NIST Secure Software Development Framework (SSDF). Practice PW.7 covers reviewing and analyzing human-readable code to identify vulnerabilities. Your AI SAST scan records, evidence trails, suppression logs, and override rates show auditors that AI-written code gets the same review as human-written code.
10. Run AI SAST alongside SCA, secrets detection, and code review
Why it matters
AI SAST covers first-party code, the code your team and its agents write. Most of a typical application is open-source dependencies, packaged into containers, with credentials scattered through config and history. Each of those needs its own control.
Software composition analysis (SCA) analyzes the third-party open-source packages you depend on for known vulnerabilities and license issues. You need both.
How to do it
- Pull findings from code, dependencies, containers, and secrets into one prioritized view, ranked by the same reachability and exposure rules.
- Use reachability across layers. A vulnerable function in a dependency matters more when your first-party code calls it.
- Keep human review for design decisions and threat modeling, where people still outperform tools.
- Scan full Git history for secrets, since a credential deleted from the current branch is still in the history.
Endor Labs provides full-stack reachability across first-party code, open-source dependencies, and container images. Endor Labs Open Source secures dependencies, containers, and AI models. Secrets Detection scans full Git history, validates findings as live or revoked, and stops leaks at pre-commit. Endor Labs Patches remediates open-source vulnerabilities with backported patches when an upgrade would break your code.
How Endor Labs puts these practices into one workflow
Most of these practices come down to two habits: give the analysis enough context to be right, and show the evidence so people can trust it.
AURI by Endor Labs puts checks inside the IDE and the agent loop. AI Security Review covers the pull request. The code context graph gives every scan full-repository context. Specialized agents pair deterministic program analysis with LLM reasoning, and every finding carries its data flow and reachability proof. Policy learning, Coding Agent Governance, and full-stack reachability across code, dependencies, and containers cover the rest of the program.
To see the capabilities behind these practices, visit Endor Labs AI SAST. If you'd rather explore on your own schedule, take the AI SAST tour.
FAQ
Does AI SAST replace manual code review?
AI SAST complements manual code review by handling high-volume vulnerability detection, so human reviewers can focus on design, architecture, and threat modeling. It catches injection flaws, access control gaps, and logic errors across every pull request. People still decide whether a design is sound and whether a fix fits the system.
Is it safe to send proprietary source code to an AI SAST tool?
It's safe when you know exactly what code leaves your environment and how the vendor stores it. Ask whether the tool sends whole files or targeted context, whether your code is used for model training, and how long data is retained. Endor Labs AI SAST queries a semantic model of your application instead of dumping your codebase into an LLM.
Should AI SAST block pull requests?
AI SAST should block pull requests only for a short, agreed list of high-confidence, evidence-backed finding types. Run in monitor-only mode first, then comment on PRs, then add blocking rules one category at a time. Widen the list as developer feedback and override data show the findings hold up.
What is the difference between SAST and SCA?
SAST analyzes the first-party code your team writes, while SCA analyzes the third-party open-source dependencies your code pulls in. SAST finds flaws like injection and broken access control in your logic. SCA finds known vulnerabilities and license risks in packages. A complete program runs both and ranks the results together.
What's next?
When you're ready to take the next step in securing your software supply chain, here are 3 ways Endor Labs can help:




