diffox
Blog

AI security scanning: Claude Security, Codex Security and SAST

Does an AI vulnerability scanner find what SAST misses, and how many false alarms does it raise? We read five vendors’ docs and independent research.

ShareXLinkedIn

Summary. AI security scanning means having a language model read code and look for vulnerabilities in it. SAST is classic static analysis: it scans code against rules written in advance, without running it. On 4 November 2026 we read the documentation of the security tools from Anthropic, OpenAI, GitHub, Cursor and Google, and the studies that compare the two methods, each at its source.

  • The two find different vulnerabilities. A rule-based scanner catches known patterns the same way every time; an AI scanner, as its vendors describe it, follows data across files and looks for authorization and business-logic flaws. In the IRIS study, GitHub’s static analysis tool CodeQL found 27 of 120 real vulnerabilities on its own, and 55 together with a language model.
  • AI cuts SAST’s noise, but it can also throw out a real vulnerability. In the Sifting the Noise study, an AI agent brought the share of harmless cases flagged by SAST down from 98.3% to 6.3%; the same agent also dismissed 22.25% of the real vulnerabilities as false alarms.
  • An AI finding is a claim until it is verified. Anthropic, OpenAI and Cursor check a finding again before they show it to you: in a separate stage, in a sandbox or with a test. Anthropic’s and OpenAI’s documentation also says that two scans of the same code can give different findings.
  • Each has its place. SAST in CI on every push, AI review on the pull request, a deep AI scan of the whole repository on a schedule. The vendors’ own documentation, too, puts AI scanning next to SAST, not in its place.

What is AI security scanning, and what changed this year?

55/120real vulnerabilities CodeQL found with a language model; 27 on its own (IRIS)
6.3%of harmless cases still flagged by SAST after the AI agent’s triage; 98.3% before (1,325 cases)
22.25%of real vulnerabilities dismissed as false alarms by the same AI agent (1,411 cases)
3–11distinct findings: same code, same prompt, three runs (Semgrep’s test)

We covered the risk list that OWASP, a software security foundation, publishes for language model applications in the OWASP LLM Top 10 post, and how to review the code an agent writes in a separate post. This post asks the question the other way round: does it work to have a language model look for vulnerabilities, and where does that fit next to the SAST you have used for years?

This year, vendors released dedicated products that have a language model hunt for vulnerabilities. Anthropic’s Claude Code Security opened as a limited preview on 20 February 2026; since 30 April 2026 it has been in public beta for Enterprise customers under the name Claude Security, and since 21 October 2026 it scans connected repositories continuously and closes a finding on its own once it is fixed. Aardvark, which OpenAI announced as a private beta on 30 October 2025, went into research preview as Codex Security on 6 March 2026. On 23 September 2026, Cursor released Security Reviewer, which reads every pull request with an eye on security.

GitHub takes another route: its own static analysis engine, CodeQL, finds the vulnerability, and Copilot Autofix writes the fix. When you assign a vulnerability Dependabot found in a dependency to Copilot, or to another agent such as Codex or Claude, the agent opens a draft pull request. At Google, DeepMind’s CodeMender was announced as a research project on 6 October 2025, and Google has an open-source security extension for Gemini CLI. We found no page devoted to security scanning in Antigravity’s documentation.

The vendors make a similar promise: to find the vulnerabilities a rule-based scanner misses, and to filter out false alarms before a finding reaches you. This post checks that promise against the vendors’ own documentation and against independent research, and ends with a suggestion of where to run which.

What does a rule-based scanner find, and what does AI add?

SAST (Static Application Security Testing) is security analysis that examines code without running it; CodeQL, Semgrep and SonarQube belong to this class. Such a tool matches code against rules written in advance and gives the same answer for the same code every time. OWASP’s SAST page lists its strengths: it scales to a lot of software and can run again and again, every night or on every CI run; it finds well-known vulnerabilities such as SQL injection and buffer overflows; and it shows the problem with its file name, line number and code snippet. The weaknesses are on the same page: authentication problems, access control flaws and insecure use of cryptography are hard to search for automatically; it raises many false alarms; it often can’t find configuration problems, which don’t show in the code; and it is hard to prove that what it found is really a vulnerability.

The vendors of AI scanners aim at exactly this gap. According to Anthropic, static analysis is mostly rule-based: it matches code against known vulnerability patterns and catches an exposed password or outdated encryption, but often misses business-logic flaws and broken access control. Claude Security instead tries to understand how components work together and to trace how data moves through the application. OpenAI, too, writes that Aardvark doesn’t rely on classic program analysis techniques such as fuzzing, and that it looks for vulnerabilities by reading code and by writing and running tests. Cursor puts the difference in a concrete example: static analysis flags every string concatenation near a SQL call but misses the authorization check that stopped running after a refactor. Here is the same distinction in a small diff:

EXAMPLE. Two kinds of flaw in one diff. orders.py · diff:  def get_order(user, oid): / +    sql = "UPDATE orders SET seen=1 WHERE id=" + oid / +    db.run(sql) / +    if oid in cache: / +        return cache[oid] /      return owned(user, oid). "…id=" + oid: Input reaches the SQL through string concatenation. A rule catches this on every scan. return cache[oid]: The cached order skips the ownership check. A scanner that follows the path sees this. owned(user, oid): The ownership check lives in this function, in another file.
A made-up example that acts out the distinction from Cursor’s Security Reviewer announcement. The function names are illustrative.

A rule catches the first marked line on every scan, because the pattern sits in the line itself. The second vulnerability has no pattern: to see it, you have to read the owned function in another file and know which user may see which order. AI scanners get that knowledge from a threat model. As OpenAI defines it, a threat model is a short security summary of how the repository works: its entry points and who can send them input, its trust boundaries, its sensitive data and the actions that need privileges. Claude Security and Codex Security draft this model from the code themselves, and you can correct it.

Not every vendor sets the two methods against each other; some combine them in one job. At GitHub, CodeQL finds the vulnerability and Copilot writes the fix; agentic autofix checks that the fix works by running CodeQL again. CodeMender, too, validates its patches with tools such as static and dynamic analysis and fuzzing. The peer-reviewed IRIS study, published at the machine learning conference ICLR 2025, measured this combination: the language model tells CodeQL which functions bring in data from outside and which ones are dangerous, and CodeQL does the search. Of 120 vulnerabilities in real Java projects, CodeQL alone found 27, and 55 with the language model; the false discovery rate also improved by 5 points on average.

Which tool scans what?

On 4 November 2026 we read about the five vendors’ security tools in their own documentation. Most of them do three jobs, each in its own way: they scan, they check a finding once more before showing it to you, and they suggest a fix.

Five vendors’ AI security scanning tools: what they scan and when, how they check a finding, whether they suggest a patch, and who can use them
ToolWhat it scans, and whenBefore a finding reaches youPatchWho can use it
Claude SecurityA connected repository once from end to end, then its changes regularly, by risk; with the Claude Code plugin, a repository, a branch or a pull requestRe-examined in a separate stage that tries to prove or disprove it; a confidence rating on every findingSuggests a targeted patch; nothing is applied without human approvalPublic beta on Enterprise; the plugin on paid plans and through the API
Codex SecurityA GitHub repository once or on every new commit; pull requests with Security Review and a GitHub Action; locally, a plugin and a CLIWhere possible, validated by triggering the vulnerability in a sandbox; the evidence is attached to the findingSuggests one; you open the draft pull requestCloud in research preview; Security Review on Pro, Business, Enterprise and Edu
GitHub CopilotVulnerabilities CodeQL found (Copilot Autofix); pull requests (Copilot code review)Agentic autofix validates the fix by running CodeQL againAutofix suggests a single fix; agentic autofix opens a draft pull requestAutofix on public repositories; on a private one, with a GitHub Code Security licence
CursorSecurity Reviewer: every pull request; Vulnerability Scanner: the whole repository, on a scheduleFor a scan finding, an agent writes and runs tests on the real code path: confirmed, refuted or inconclusiveA one-click fix on the pull request; test and fix pull requests for a scan findingOn the Teams and Enterprise plans
Antigravity CLINot stated in the documentationNot stated in the documentationNot stated in the documentationNot stated in the documentation
Gemini CLIThe change on a branch (/security:analyze) and dependencies (OSV-Scanner)Not stated in the documentationFor a dependency, says which version to upgrade toGoogle’s open-source extension

Source: the vendors’ documentation and announcements, 4 November 2026. “Not stated in the documentation”: in the pages we read that day, we found no sentence that describes this. Google DeepMind’s CodeMender is a research project; DeepMind writes that it hopes to release it as a tool every developer can use.

Two things stand out in the table. The first is how a finding gets checked. OpenAI tries to trigger the vulnerability in a sandbox, that is, an isolated environment, and Cursor tries writing and running tests on the real code path; Anthropic has the finding re-examined in a separate stage and tries to prove or disprove it. Evidence from running code is stronger: according to OpenAI’s documentation, source analysis can show a code path to the vulnerability, while execution evidence shows that a specific test really triggered it. The second is that none of them merges the patch for you. Anthropic applies nothing without human approval; in Codex Security, you open the draft pull request yourself; Cursor and GitHub’s agentic autofix open a draft, and the merge is still up to you.

You can also start without setting up a separate product. /security-review in Claude Code and in the GitHub Copilot app, /review-security in Cursor and /security:analyze in Gemini CLI review the change on your branch for security in a single pass. GitHub’s documentation says this is not a full repository audit and doesn’t replace code scanning.

What do the studies and the vendors’ own measurements say?

First, the vendors’ own numbers. Each is the vendor’s own measurement, and most of them lack a denominator:

  • OpenAI. According to the Codex Security announcement, more than 1.2 million commits were scanned across external repositories in the beta cohort over the last 30 days; they produced 792 critical-severity and 10,561 high-severity findings, and critical issues appeared in under 0.1% of the scanned commits. It says the false alarm rate fell by more than 50% across all repositories during the beta, but gives no starting rate. The Aardvark announcement says that 92% of known and synthetically introduced vulnerabilities were found; it doesn’t give the number of repositories or vulnerabilities in the test.
  • Anthropic. The company writes in its February announcement that it found more than 500 vulnerabilities in production open-source codebases with its own model, and in its October announcement that Claude Security has found more than a million vulnerabilities at thousands of organizations since April. Neither gives a false alarm rate.
  • Google. For Gemini CLI’s security extension, the company reports 90% precision and a 93% catch rate on the OpenSSF CVE Benchmark, which is made of known vulnerabilities in real applications; it says the dataset has a small number of repositories but doesn’t give the number of vulnerabilities.

We covered the questions to ask when you read a vendor’s score in the post on AI code review benchmarks. Independent studies paint a more cautious picture:

Five studies that compare looking for vulnerabilities with AI against SAST, or put it to the test: what they measured, what they found and how they were published
StudyWhat it measuredWhat it foundStatus
IRIS120 vulnerabilities in real Java projects; CodeQL alone and with a language modelCodeQL found 27 vulnerabilities, and 55 with the language model; the false discovery rate improved by 5 pointsPeer reviewed, ICLR 2025
Zhou et al.15 SAST tools and 12 open-source language models on Java, C and Python repositoriesSAST found few vulnerabilities, with few false alarms; the models found 90%–100% of the vulnerabilities, with many false alarms; combining the two partly made up for their weaknessesNot peer reviewed, July 2024
Sifting the NoiseAlerts from four SAST tools on the OWASP Benchmark, triaged by AI agentsHarmless cases with an alert fell from 98.3% to 6.3%; the agent also dismissed 22.25% of the real vulnerabilities as false alarmsPeer reviewed, ISSTA 2026
ALIBIAn agent that adds misleading comments along with a vulnerability, against 4 AI detectorsOn 125 null pointer vulnerabilities, the attack succeeded more than 90% of the timeNot peer reviewed, 27 July 2026
Semgrep’s testClaude Code and Codex on 11 open-source Python web applications; 445 findings checked by hand14%–18% of the reported vulnerabilities were real; three runs with the same prompt gave 3, 6 and 11 distinct findingsA SAST vendor’s test, 2 September 2025

Source: the studies’ own pages, 4 November 2026. ICLR is a machine learning conference and ISSTA a symposium on software testing and analysis; both have the papers they publish assessed by reviewers. The OWASP Benchmark is a Java test suite built to measure the speed and accuracy of scanners. “Not peer reviewed”: a preprint posted on arXiv that has not been through peer review. Semgrep’s test was run with general-purpose agents, without the verification step that security products add.

Three conclusions follow from the table. First, combining the two methods works: in IRIS, the language model widened CodeQL’s search, and in Zhou et al., the combination partly made up for the weaknesses of both sides. Second, the AI’s judgement is wrong too, and not at random: in Sifting the Noise, the agent missed only 1.1% of the real vulnerabilities in SQL injection, but 84.5% in weak hashing. According to the authors, categories such as weak cryptography, weak hashing and trust boundaries need domain knowledge, such as an algorithm’s strength, the configuration or the threat model; there, the agent may wave an alert through as mere best-practice advice, or assume a safeguard that isn’t there. Third, the result isn’t stable, and it can be steered: in Semgrep’s test, the same code and the same prompt, that is, the same instruction given to the model, produced three different lists in three runs; in ALIBI, comments misled the detector. As the authors stress, a comment doesn’t change what the program does, but it can change how the language model reasons.

The products’ documentation acknowledges this variability too. According to Anthropic, two scans of the same code can surface different findings; OpenAI writes that results can vary even with the same configuration, and that if an important finding disappears in a later scan, you should recheck it directly. Against steering through comments, ALIBI’s authors find prompt-level defences weak; stripping comments before the detector sees them and isolating the detector work much better. We covered similar steering through a pull request’s description in the post on workspace trust and prompt injection.

Most vendors don’t give the cost as a single figure. GitHub writes that the fixes Copilot Autofix suggests don’t consume AI credits. In Codex Security Cloud, scans set up after 1 October 2026 are billed by token usage, that is, by the amount of text the model reads and writes, and don’t count toward your plan’s included usage; the cost limit in the CLI is an estimate, not a hard cap. Claude Code’s Code Review has no flat price per review; you pay by token usage. In Sifting the Noise, triaging a single SAST alert cost between $0.0028 and $0.1867, depending on the agent and the model.

Where should you run SAST and AI scanning?

The vendors’ own documentation puts AI scanning next to SAST, not in its place. In the table of security layers in Claude Code’s documentation, the place in CI belongs to your existing static analysis and dependency scanners: language-specific rules, supply-chain checks and policy enforcement. The same page says that the Claude Security plugin doesn’t replace your existing source code security tools but complements their deterministic checks. The documentation adds up to a setup in three layers:

Which one runs where ?. On every push, in CI: SAST. What it finds: Known patterns. Always the same result; it can stop a merge. On the pull request: AI review. What it finds: Paths a change opens. Reads the change with the whole repo, writes comments. On a schedule, whole repo: deep AI scan. What it finds: Flaws in old code. Takes long; verifies findings and suggests patches.
Compiled from Anthropic’s, OpenAI’s, Cursor’s and GitHub’s documentation, 4 November 2026.
  • On every push, in CI: SAST. It is fast and gives the same result for the same code every time; if a finding is to stop a merge, this is the right layer. GitHub, too, ties stopping a merge in Code Quality to rule-based findings. Dependency scanning belongs here as well.
  • On the pull request: AI review. It reads the change together with the whole repository and writes comments; Cursor’s Security Reviewer, OpenAI’s Security Review and GitHub’s Copilot code review work at this layer. OpenAI recommends taking reports only at first, and deciding which outcomes should stop a merge after looking at the quality of the findings, the coverage, the cost and the run time; Claude Code’s Code Review never approves or blocks a pull request. Be careful with pull requests from forks: OpenAI’s example workflow doesn’t scan them, and it says a skipped job does not count as a security review; Anthropic, too, writes that its security review Action is not hardened against prompt injection and should run only on pull requests you trust.
  • On a schedule, across the whole repository: a deep AI scan. It also sees old code that no pull request touches; Cursor recommends this scan for finding problems that were already there and slipped through pull request review. OpenAI’s example workflow scans the default branch once a week, Cursor’s Vulnerability Scanner runs on cron, and Claude Security rescans changes at regular intervals, by risk. A deep scan can take a long time; in OpenAI’s CLI, the default time limit is 96 hours. That is why it makes more sense to tie it to a schedule than to every pull request.

Wherever it runs, an AI finding is a claim until it is verified. We covered when it works to have one model check another model’s judgement in the LLM-as-a-judge post; for a security finding, the strongest check is a test that actually triggers the vulnerability. Before you accept a finding, or trust a “no issues” answer, look at these:

Before you trust an AI finding. Read both the finding and a “no issues” answer with their evidence. Can an attacker reach it?: The finding should show the path in from an entry point. Is there a test that shows it?: A test that ran is stronger evidence than reading the source. Is the threat model right?: You tell the scanner about safeguards the code doesn’t show. Does the patch add a new vulnerability?: Review the patch like code, and run the tests. Did the scan finish?: An empty report doesn’t mean the code is secure. Did AI close a SAST alert?: Have a person confirm it; real vulnerabilities get dismissed too.
Source: OpenAI’s, Anthropic’s and GitHub’s documentation and the Sifting the Noise study, 4 November 2026.

The question about the patch is there for a reason: GitHub’s documentation says that a fix Autofix suggests may fail to close the vulnerability, or may introduce a new one. The last two questions share one reason: an AI saying “no findings” and an AI closing a SAST alert are both decisions, and either can be wrong. OpenAI writes that a scan with no findings can still miss vulnerabilities, and Anthropic that a review with no findings doesn’t mean the code is secure; the agent in Sifting the Noise had dismissed 22.25% of the real vulnerabilities as false alarms.

diffox works at the second of these three places: on the pull request. When it reviews a pull request, it follows the behaviour the change sets out to create from where it starts to where it takes effect, including files the pull request didn’t change. On the security side, it looks for unvalidated input reaching a file, a query or a command, and for missing authorization; before it reports a problem, it reads the code that proves it. It sorts its findings into the Critical, Warning and Suggestion classes, posts them as comments on the pull request, and never blocks a merge. Next to the SAST in your CI, this is the layer that looks at the path a change opens.

Frequently asked questions

What is an AI vulnerability scanner?

A tool that looks for vulnerabilities by having a language model read the code. Unlike a rule-based scanner, it doesn’t match known patterns: it reads the code and follows data across files, so it can also look for authorization and business-logic flaws. Anthropic’s Claude Security, OpenAI’s Codex Security and Cursor’s security agents check a finding again before they show it to you, in a separate stage, in a sandbox or with a test, and suggest a fix. Because the results can change from run to run, read every finding as a claim that has to be verified.

What is SAST?

Short for Static Application Security Testing: tools that look for vulnerabilities by examining source code or compiled code without running it. CodeQL, Semgrep and SonarQube belong to this class. According to OWASP, SAST can run again and again, every night or on every CI run, finds well-known vulnerabilities such as SQL injection and buffer overflows, and shows the problem with its file and line. OWASP lists the weaknesses too: it struggles to find authentication and access control problems, raises many false alarms, and often misses configuration problems that don’t show in the code.

Will AI replace SAST?

The vendors’ documentation doesn’t say so. The table of security layers in Claude Code’s documentation leaves your existing static analysis in CI and says that the Claude Security plugin doesn’t replace it; at GitHub, CodeQL finds the vulnerability and Copilot writes the fix. Research also shows that the two are strong on different vulnerabilities: in the IRIS study, CodeQL found 27 of 120 real vulnerabilities, and 55 together with a language model. In the Sifting the Noise study, which had an AI agent triage SAST alerts, the agent weeded out most of the false alarms, but it also dismissed 22.25% of the real vulnerabilities as false alarms; it went wrong most often on weak cryptography, weak hashing and trust boundary flaws.

What is Codex Security?

OpenAI’s application security agent. It was announced as a private beta under the name Aardvark on 30 October 2025 and went into research preview as Codex Security on 6 March 2026. It reads the repository and drafts an editable threat model, looks for vulnerabilities based on it, validates a vulnerability by triggering it in a sandbox where possible, and suggests a fix. It can scan a connected GitHub repository in Codex cloud once or on every new commit; it also runs locally as a plugin and a CLI, and in CI as a GitHub Action. Security Review, which scans pull requests, is available on the ChatGPT Pro, Business, Enterprise and Edu plans.

What is Claude Security?

Anthropic’s security scanning product. It opened as a limited research preview under the name Claude Code Security on 20 February 2026, and since 30 April 2026 it has been in public beta for Enterprise customers as Claude Security. It first scans a connected repository from end to end, then rescans its changes regularly, by risk; it closes a finding once it is fixed and reopens it if the vulnerability shows up again. Every finding is re-examined in several stages before it reaches an analyst, and carries a confidence rating. In Claude Code there is also a Claude Security plugin that runs the same scan locally, and the /security-review command, which reviews the change on your branch in a single pass.

How many false alarms does AI security scanning raise?

It varies a lot with the product and its verification step, and independent measurements are few. In Semgrep’s test of 2 September 2025, only 14%–18% of the vulnerabilities reported by two general-purpose coding agents, running without a separate verification step, were real. That is why security products check a finding once more before showing it; OpenAI writes that Codex Security’s false alarm rate fell by more than 50% across all repositories during the beta, but doesn’t give the starting rate. The way to measure it on your own repository is to take the findings as reports only for a while and check them by hand; OpenAI also recommends starting this way in CI.

Does diffox look for vulnerabilities?

Yes, in the change a pull request makes. diffox follows the behaviour the pull request sets out to create, including through files that didn’t change; on the security side, it looks for unvalidated input reaching a file, a query or a command, and for missing authorization. Before it reports a problem, it reads the code that proves it. It sorts its findings into the Critical, Warning and Suggestion classes, posts them as comments on the pull request, and never blocks a merge.