If your developers merge coding-agent output every day and your code is on GitHub, buy GitHub Code Security (CodeQL) and Secret Protection for the merge gate, and put Semgrep inside the agent's loop. That pairing costs $49 per active committer a month on GitHub's list price, and GitHub already runs CodeQL, secret scanning and an advisory check on its own coding agent's pull requests for free. Snyk is the right pick when dependency risk is your bigger worry. SonarQube is the wrong primary security scanner for agent code, and Checkmarx One is for enterprises that already run it. Whichever you shortlist, run a two-week bake-off on your own agent-written pull requests before you sign, because no independent benchmark measures what you are buying.
Prices below were checked on each vendor's live pricing page on December 1, 2026. The cost column normalises everything to one workload: 200 active committers on GitHub Enterprise Cloud, roughly 100 private repositories, with Copilot, Claude Code and Cursor opening pull requests daily, buying SAST plus secret scanning.
| Product | List price (checked Dec 1, 2026) | 200 committers, SAST + secrets | Runs inside the agent loop? | Verdict |
|---|---|---|---|---|
| GitHub Code Security (CodeQL) + Secret Protection | $30 + $19 per active committer/month | $9,800/month | GitHub MCP server reads alerts; Copilot agent self-checks with CodeQL | Default pick on GitHub |
| Semgrep (Code + Secrets) | $30 + $15 per contributor/month (Teams) | $9,000/month | Yes: semgrep mcp, hosted MCP server (beta) |
Best in-loop scanner |
| Snyk (Code + Secrets) | Team from $25/month (≤10 devs); Enterprise 1.0 + 0.66 credits per contributor/day at $1 | ~$10,100/month at rate-card list | Yes: local Snyk MCP server | Pick for dependency-heavy shops |
| Checkmarx One | Contact sales; no list price | Quote only | Yes: hosted Checkmarx MCP | Only if you already run it |
| SonarQube Cloud / Server | Team from $34/month per 100k LOC; Enterprise and Server contact sales | Quote only (Team is for under 50 devs) | Yes: SonarQube MCP server | Loser for this job |
Which Scanner Should Gate Agent-Written Pull Requests?
The scanner that gates agent pull requests should sit where every agent's output passes, which for a GitHub shop is the pull request itself, and that favours CodeQL. GitHub's documentation says its cloud coding agent "checks code it generates for security issues" using CodeQL, checks newly introduced dependencies against the GitHub Advisory Database for malware and High or Critical vulnerabilities, and runs secret scanning. The same page says this validation does not require a Secret Protection, Code Security or Advanced Security licence. In June 2026 GitHub extended those checks to third-party coding agents, naming Claude and OpenAI Codex, as a generally available feature.
So part of the job is already done before you buy anything. What the paid licence adds is coverage of the code your developers' local agents write. A pull request opened by a developer who ran Claude Code or Cursor on a laptop is an ordinary human pull request to GitHub, and it only gets CodeQL if you pay for GitHub Code Security at $30 per active committer a month. Secret Protection is another $19 on the same page. At 200 committers that is $9,800 a month at list.
The case for CodeQL as the gate is placement, and it rests on less evidence than its reputation suggests. On AI-generated code its detection numbers are no better than Semgrep's (see the evidence section below). It wins because the same engine checks GitHub Copilot's own pull requests, results land in the security tab you already triage, and you do not add another vendor to the merge path.
Who should not pick it: anyone whose code lives in GitLab, Bitbucket or Azure DevOps, and teams that want to write custom rules quickly. CodeQL queries are a real language to learn, and Semgrep rules look like the code they match.
Which Scanners Run Inside the Coding Agent's Loop?
Semgrep, Snyk, Checkmarx and SonarQube all now ship an MCP server, so an agent can scan its own edit before it commits. Outside GitHub's own cloud agent, CodeQL reaches an agent only as alerts it can read. The difference matters because an agent that sees a finding mid-task fixes it in the same session, while a finding raised in CI comes back to a human a day later.
- Semgrep moved its MCP server into the main binary. The standalone repository was archived on October 28, 2025, with updates now shipped through
semgrep mcp, and Semgrep's docs describe a hosted MCP server, still labelled beta, that works with Claude Code and other clients. - Snyk documents a local MCP server that runs Snyk Code, Snyk Open Source and Snyk IaC scans from an agent, and names Claude Code, Codex CLI, Cursor and Gemini CLI.
- Checkmarx runs a hosted MCP server that connects Checkmarx One to MCP-compatible tools such as Claude Code and Windsurf, and it requires an active Checkmarx One tenant.
- SonarQube has an MCP server that connects a coding agent to SonarQube's quality and security data.
- GitHub's own MCP server has a
code_securitytoolset that lists, reads and updates code scanning alerts. It reports what CodeQL already found; it does not run a scan on the agent's working copy.
Semgrep is the best fit for this slot. It runs locally and fast, its free tier covers up to 10 contributors and 10 repositories, and its rules are easy enough to write that your AppSec team can encode the mistakes your agents keep making. Watch Snyk's metering if you choose it here instead: the Team plan includes 1,000 Snyk Code tests a month, and an agent that scans after every edit can spend that in days.
Who should not pick Semgrep: teams that want one vendor for SAST, dependencies and containers with a single contract. Semgrep's Supply Chain product is another $30 per contributor, and its container story is thinner than Snyk's.
What Independent Evidence Says About Detection and False Positives
The scanners that have been independently tested miss most real vulnerabilities, and on AI-generated code Semgrep and CodeQL disagree with ground truth about four times in ten. Checkmarx One appears in none of the studies below. Vendor-run results say otherwise, so keep the two apart.
The widest academic comparison is Li et al. at ESEC/FSE 2023, which tested seven free or open-source Java tools, including CodeQL, Semgrep and SonarQube, against real-world Java vulnerabilities. The tools detected only 12.7% of real-world vulnerabilities, and even combined, 70.9% went undetected. They looked far better on synthetic benchmarks.
On LLM-written code specifically, Firouzi and Ghafari (arXiv, February 2026) ran Semgrep and CodeQL over 1,080 generated samples. 61% of the samples were genuinely secure; Semgrep classified 60% as secure and CodeQL 80%. Per sample, only 65% of Semgrep's verdicts and 61% of CodeQL's matched ground truth. A second 2025 study on ten real-world C# projects put SonarQube, CodeQL and Snyk Code at mean F1 scores between 0.260 and 0.546, below the LLMs it tested.
The closest thing to field data on agent pull requests is Rabbi et al. (April 2026), who ran Semgrep 1.135.0 over 675 security-related pull requests from Codex, Copilot, Devin, Cursor and Claude Code. 104 of them (15.4%) introduced at least one new finding, 853 in all, and 52.4% of the 675 were merged. The paper does not report a false-positive rate, which is the number an AppSec lead most needs.
The OWASP Benchmark is the test vendors cite. It is a Java and Python suite of synthetic test cases scored as a Youden index (true-positive rate minus false-positive rate). OWASP's own project wiki says it has not published results for commercial tools, so any commercial OWASP score you see was run by the vendor or a reseller. Treat it as marketing. The widely shared blog comparisons of Snyk, Semgrep and CodeQL are single-tester posts with no published method.
Is Autofix Safe When an Agent Accepts It?
Autofix is safe only behind a human review, and an agent that applies a scanner's suggested fix on its own removes that review. GitHub's own claim is that Copilot Autofix cut median time to fix CodeQL alerts to 28 minutes against 1.5 hours manually during its 2024 beta. That is a vendor figure. GitHub's responsible-use documentation lists the limits: fixes "may suggest fixes that fail to remediate the underlying vulnerability or introduce new vulnerabilities," may change program semantics, "may suggest fabricated dependencies," and "You must always review suggestions from Copilot Autofix."
Independent work on AI-generated patches points the same way. Sajadi, Damevski and Chatterjee found that Llama 3.3 introduced 135 manually confirmed vulnerabilities across SWE-bench issues, against 12 in the developer patches for the same issues. Let an agent propose a security fix, and have a person approve it. If your agent runs with auto-approve on and an MCP scanner in its loop, it will accept fixes unreviewed.
Do These Tools Catch Hallucinated Packages and Committed Secrets?
They catch committed secrets well and hallucinated packages poorly. Spracklen et al. at USENIX Security 2025 measured an average hallucinated-package rate of at least 5.2% for commercial models and 21.7% for open-source models, and collected 205,474 unique hallucinated names. Software composition analysis (SCA) matches dependencies against known advisories. A package that did not exist last week, or one an attacker registered under a hallucinated name, usually has no advisory yet, so Snyk Open Source, Semgrep Supply Chain and GitHub's advisory check can all pass it. The control that works is outside the scanner: a registry proxy with an allowlist or a minimum package age.
Secrets are the better-covered risk, and agents make it worse. GitGuardian's 2026 report found Claude Code-assisted commits leaked secrets at 3.2%, against a 1.5% baseline across public GitHub commits, and its 2025 report found a 6.4% leak rate in public repositories using Copilot, 40% above the average. GitGuardian itself cautions that developers still decide what gets pushed. Push protection, which blocks the push before the secret lands, matters more here than detection after the fact. GitHub Secret Protection does it at $19 a committer; Semgrep Secrets is $15 per contributor; Snyk prices Secrets at 0.66 credits per active contributor per day.
Why SonarQube Loses and Who Checkmarx Is For
SonarQube is the loser for this job because its price scales with the code your agents write and its security depth beyond the base plan is a separate purchase. SonarQube Cloud Team starts at $34 a month for up to 100,000 private lines of code and is aimed at teams under 50 developers; Enterprise is contact sales, and Advanced Security is listed as an additional subscription. SonarQube Server is priced per instance per year by lines of code. Agents add lines faster than people do, so a lines-of-code meter grows with agent output while a per-committer meter does not. SonarQube remains a good code-quality gate. Keep it for that if you already own it, and do not buy it as your AI-code security scanner.
Checkmarx One is a credible enterprise platform with a weak buying path for this decision. Its pricing page says there is no list price and "We don't offer a self-serve free trial," so the two-week bake-off this article recommends requires a sales cycle first. Pick it if you already run Checkmarx, need on-premises deployment, or scan GitLab, Bitbucket and Azure DevOps together. Teams under about 100 developers should not start here.
Snyk is the pick when the dependency and container side of agent output worries you more than first-party code. Its Enterprise rate card charges 1.0 credit per active contributor per day for Code and 0.66 for Secrets, at $1 a credit, which works out to about $50 per contributor a month at list before any negotiation. The Team plan starts at $25 a month and caps at 10 developers; the page does not say whether that price is per seat. Who should not pick Snyk: a GitHub-only shop that wants SAST alone, which would pay again for checks GitHub already runs on its cloud agents' pull requests.
How to Decide: The Criteria That Predict Regret
Three questions predict regret better than any feature matrix: where your code is hosted, how agents reach your repositories, and how many findings your reviewers will actually read.
- Hosting: GitHub-only shops get agent self-checks for free and should gate with CodeQL. Mixed GitLab, Bitbucket or Azure DevOps estates should start with Semgrep, Snyk or Checkmarx.
- How agents commit: if most agent code arrives through GitHub's cloud agent, much of your SAST is already running. If it arrives through local Claude Code or Cursor sessions, you need an in-loop scanner, and Semgrep's MCP server is the cheapest good option.
- Billing unit: ask every vendor in writing whether an agent's bot account counts as an active committer or contributor. Snyk and Semgrep both define the unit as anyone who committed to a scanned private repository in the last 90 days, so service accounts can land on the bill.
- False positives on your own pull requests: no published study measures this for agent-written code. Measure it yourself.
What changes the answer: a move off GitHub, a regulator that requires on-premises scanning, or an agent fleet that mostly commits under bot identities.
This Week: Pull 50 merged agent-written pull requests from the last month and freeze them as your test set. Turn on secret scanning push protection wherever you already have it.
This Month: Run CodeQL, Semgrep and one of Snyk or Checkmarx over that set for two weeks. Have one AppSec engineer label every finding true or false, and record precision, findings per pull request, and how many real issues each tool missed that another caught.
Before Q1 Close: Sign for the tool whose precision your reviewers can live with, disable unreviewed autofix acceptance in agent settings, and put a registry allowlist or minimum package age in front of npm and PyPI.
The Bottom Line
On independent evidence these scanners catch little more on agent-written code than they did on human code, so where a scanner sits and what it bills by decide most of the outcome. On GitHub, CodeQL at the merge gate plus Semgrep in the agent loop covers the most agent output. At 200 committers, GitHub's two add-ons cost $9,800 a month at list, and Semgrep Code adds $6,000 once you pass its 10-contributor free tier. Measure precision on your own pull requests before you pay for either.
Continue Reading
- Best AI Code Review Tools for a Monorepo: Buy Precision
- Codex Security Cloud Scans New Commits With No Per-Scan Price
- 12 Models Wrote a Fake Crate. None Refused a Real One.
- Claude Ship Lets Anthropic Agents Approve Routine GitHub PRs
- GitHub Enterprise Adds Copilot, Bills From First Use
- 182 Credentials Hid in 'Encrypted' Reasoning. Go Rotate.
