Twelve pull requests, forty minutes before your next meeting. You scan the diffs, see green tests, and type LGTM. You have done this for years. The difference is that a model wrote all twelve, and no two of them know what the others changed. It's time to learn about AI code review.
What is AI code review?
AI code review uses AI to read a code change, explain what it does, and flag security issues before it merges, alongside human reviewers. It pairs large language models with static analysis, then posts findings where developers already work. It doesn't replace human reviewers, it gives them the advantage.
Two terms matter here:
Pull request (PR) is a proposed set of code changes that a teammate reviews before it joins the main codebase.
Large language model (LLM) is an AI model trained on text and code. It can read a change and reason about it in plain language.
The security angle is what makes this category matter now. Georgetown's Center for Security and Emerging Technology tested five large language models against the same set of prompts and found that almost half the code snippets they produced contained security weaknesses. CSET's guidance is direct: apply existing cybersecurity guidance to code that a model wrote. Authorship does not change the standard.
How AI code review works
The process starts with the PR diff, which is the exact set of lines added or removed in a change. Static analysis builds context around that diff, including call graphs and data flow. A call graph maps which functions call which other functions across your app.
The AI layer then reasons about the change. It summarizes what the code does, judges the risk, and posts findings as PR comments with a severity level. This is the key difference from older tools. Pattern matching looks for known-bad strings, while AI reasoning tries to understand intent.
AI code review vs. traditional (manual) code review
Manual review and AI review are complementary. Humans bring deep context and judgment, but they cannot read every change quickly. Automated review is fast and consistent, but a person still makes the final call.
Why AI-generated code changes the review problem
AI now writes a large and growing share of code. More changes reach review than human teams can read line by line. According to Stack Overflow's 2025 developer survey, 84% of respondents are using or planning to use AI tools in their development process.
That volume brings a second problem. AI models learn from public code, so they can reproduce insecure patterns from their training data. Reviewing AI-generated code for security impact is the core reason this category matters right now.
Common security flaws in AI-generated code
AI-generated code often passes tests and looks correct while hiding real risk. The recurring common flaws in AI-generated code tend to fall into a few groups:
- Key point: Missing input validation. AI code often skips checks that stop injection attacks (CWE-20, CWE-89, CWE-78).
- Key point: Hardcoded secrets. Keys and passwords get written directly into source code (CWE-798).
- Key point: Broken authentication and access control. Endpoints ship without proper permission checks (CWE-306, CWE-284).
- Key point: Hallucinated dependencies. Models suggest packages that do not exist or are outdated.
- Key point: Design drift. Changes quietly shift how a system is structured, with no obvious bug.
The dependency problem is measurable. Endor Labs' 2025 State of Dependency Management research found only 1 in 5 AI-recommended dependency versions is safe, and 34% of AI-recommended packages are hallucinated.
The rate of insecure output is high. Security vendor Veracode's 2025 GenAI report found that 45% of code samples failed security tests and introduced OWASP Top 10 security vulnerabilities into the code.
Why manual review can't keep up
The math is simple. AI produces far more PRs, and reading every one by hand is expensive and slow. Review quality drops as the queue grows.
The data shows this happening. Engineering telemetry from Faros AI reports that 31% more PRs are merging without any review. That gap is exactly where risk slips through.
Automation is the practical answer. A closer look at scaling review to AI velocity makes the point clear. Manual review of every AI-generated PR does not scale, so teams need help triaging what to read closely.
What AI code review looks at: security-relevant changes
Not every diff carries the same risk. A renamed variable is cosmetic. A change to who can access an endpoint is security-relevant. Good AI review learns to tell these apart.
This matters because the riskiest issues are change-driven, not just known CVEs. Many real incidents started with a small, subtle edit that no vulnerability scanner flagged. The story of subtle changes behind real breaches shows how minor code and config edits led to major outcomes.
How AI code review reasons: developer, architect, and security perspectives
Strong review reasons in three dimensions instead of one. Reading a change from a single angle misses the issues that live between the lines.
- Developer view: What changed, and is it correct? This catches logic bugs and broken behavior.
- Architect view: How does this affect the design and blast radius? This catches structural drift.
- Security view: Can this be exploited, and what is the impact? This catches injection, weak auth, and data exposure.
Combining these three views catches design flaws and logic issues that single-pass pattern tools miss. Endor Labs builds on this idea with a multi-agent security review that puts a developer, architect, and security-engineer perspective on every change.
Cutting the noise: which findings actually matter
The most common objection to any scanner is false positives. A false positive is a finding that is flagged as a problem but is not actually exploitable. Too many of them, and reviewers stop reading the results.
Reachability analysis solves this. Reachability asks whether attacker-controllable input can actually reach the vulnerable code. If nothing can reach the flaw, it is far lower priority than one sitting on a live path.
Most findings do not clear that bar. Endor Labs' research on function-level reachability analysis found that less than 9.5% of vulnerabilities are exploitable at the function level. Prioritizing by reachability lets teams fix the few findings that matter first.
AI code review vs. SAST, SCA, and secrets scanning
AI-powered review works alongside older tools, not instead of them. Each one covers a different slice of risk. Here is a plain-language taxonomy.
- SAST: Static application security testing scans your own source code for known bad patterns.
- SCA: Software composition analysis checks your open-source dependencies for known vulnerabilities.
- Secrets detection: Finds credentials and keys committed into your code.
- AI code review: Reasons about the change itself and its intent, catching logic and design flaws.
Pattern tools have blind spots. A review of what traditional SAST misses shows how logic and design flaws slip past rule-based scanning. For AI-specific risks, OWASP's Top 10 for LLM applications is a useful reference framework. SAST and static analysis are expected coverage, not the whole answer.
How to choose an AI code review tool
Evaluate AI code review tools on evidence, not claims. Use this checklist when you compare options.
- Accuracy and noise: Ask for the false-positive rate on your own stack, not a demo repo.
- Prioritization: Does it rank findings by reachability and real impact?
- Change coverage: Does it catch security-relevant changes, not just known patterns?
- Workflow fit: Does it post to PRs and run in your CI/CD pipeline?
- Deployment and data handling: How is your code stored and processed?
- Human-in-the-loop controls: Can a person review before anything blocks a merge?
One practical tip: pilot the tool on your worst repo, not your cleanest one. That is where you learn how it handles real noise.
Best practices for rolling out AI code review
A good rollout is gradual and measured. These steps keep the process useful and trusted.
- Keep a human in the loop. Separate the person who prompts the AI from the person who approves the change.
- Start in report-only mode. Let the tool comment before it blocks anything.
- Tune for noise. Adjust rules and thresholds so findings stay signal-rich.
- Integrate into PRs and CI/CD. Put findings where developers already work.
- Route security-relevant changes. Send auth, PII, and payment edits to the right reviewers.
- Measure success. Track review time saved, safe PRs, and defects that escaped to production.
Standards back this approach. NIST's secure-development framework for AI matters here: NIST SP 800-218A adds secure-development practices specific to AI model development throughout the development lifecycle. In short, review AI-assisted code with the same rigor you apply to human-written code.
How Endor Labs helps
Endor Labs' AI Code Review reviews every pull request for security-relevant changes at PR speed. For engineering teams, that means fewer interruptions. It explains what changed in plain language and flags issues with severity and rationale. Each finding ties back to the PR and its author.
It reasons with a developer, architect, and security-engineer trio across every pull request. Full-stack reachability then cuts the noise, so reviewers see the findings that are actually exploitable. It works with GitHub, GitLab, Cursor, and Claude Code, with no rip-and-replace.
The results are specific. In Endor Labs' AI SAST benchmark across real open-source projects, its AI SAST found 2x more real vulnerabilities than any other tool tested. That included 63 that no other tool caught. You can see how AI code review from Endor Labs fits a security-focused workflow.
Frequently asked questions
Can AI code review replace human reviewers?
No. It speeds up and scales the work, but a person still makes the final judgment call on each change.
How is AI code review different from SAST?
SAST scans code for known bad patterns. AI review reasons about what a change does and why it matters, catching logic and design flaws that patterns miss.
How accurate is AI code review, and how do I handle false positives?
Accuracy varies by tool, so prioritize by reachability, which focuses on findings that attacker-controllable input can actually reach and lowers the noise reviewers wade through.
Does AI code review work with GitHub and CI/CD?
Yes. Most tools post findings as PR comments and run inside your CI/CD pipeline, so results appear where developers already work.
Is AI-generated code safe to ship without review?
No. AI-generated code can reproduce insecure patterns from its training data, so it needs the same security review as human-written code before it ships.
Conclusion: what to do next
AI code review helps teams keep secure review in step with AI-driven development. The core idea is simple: treat AI-written code like any other change and review it with the same rigor.
Here is a short plan to get started:
- Add AI code review to your PR workflow so every change gets a look.
- Prioritize findings by reachability, not raw counts.
- Route security-relevant changes to the right reviewers.
- Keep a human in the loop for the final decision.
If you are an engineering leader, you can start for free and try it on your own repos. For security and business leaders who want a walkthrough, book a demo with Endor Labs.
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:




