AI Indexes
IT AI Index
Index › Developer platform › SAST › SonarQube vs CodeQL
Static application security testing · October 2026 Edition

SonarQube vs CodeQL

Three of fourteen models named SonarQube first on the direct prompt; zero named CodeQL. SonarQube was named by fourteen of the fourteen models and CodeQL by eleven and SonarQube carries 62 labels and CodeQL 27, so the shares are not directly comparable.

SonarQube

accepted challenger

Named in four categories this edition.

CodeQL

accepted challenger

Named in one category this edition.

First-choice share22%4%Of first choices across the direct, paraphrase, budget and scale prompts, 0 to 100.
Negative rate18%11%Negative labels as a share of the product's labels, 0 to 100.
Rank in category#2#5A position in a field of 10; printed, not drawn.
Labels6227A count; the two differ.
The two percentage rows are drawn on one 0 to 100 track, SonarQube reading right to left. Rank and label count are printed, not drawn.Semgrep was named alongside these two in twelve of the fourteen direct answers. Semgrep vs SonarQube · Semgrep vs CodeQL · SonarQube vs Snyk Code

Share is the count of first choices across the direct, paraphrase, budget and scale prompts over all fourteen models, for a mid-market B2B company; rank is within the category; every quote names the model and the prompt it came from. Both figures come from the static application security testing page.

By framing

How many of the fourteen models made each the first choice, per way of asking, and how many argued against it.
SonarQubeFirst choices, of fourteen modelsCodeQL
Direct30
Paraphrase51
Comparative003 against SonarQube
Budget-constrained311 against CodeQL
Scale-constrained00
Negative018 against SonarQube · 2 against CodeQL
Bars are first choices, 0 to 14 each sideModels that argued againstA model can name both, so the two sides of a row do not sum to fourteen.

Across every category in the October 2026 Edition, SonarQube and CodeQL were named in the same answer sixty-two times, of the 189 answers naming SonarQube and the 74 naming CodeQL. In those answers CodeQL took the first choice four times and SonarQube four.

Every model, every framing

The eighty-four answers behind the chart above, one cell each: where SonarQube and CodeQL stood in it.
ModelDirectSOCOParaphraseSOCOComparativeSOCOBudget-constrainedSOCOScale-constrainedSOCONegativeSOCO
Claude Haiku 4.5SOSOSO
GPT-5.4 miniSOCOSOCOSO
Gemini 3.5 FlashSOSOSOCOCO
Perplexity SonarSOSOCO
Grok 4.1 FastSOSOSOCOSOCOSOSOCO
Mistral SmallSOSOCOSO
DeepSeek V4 FlashSOSOCOSOCOSOCOSOCO
Llama 4 MaverickSO
Qwen 3.7 FlashSOSOSOSOCOSOCO
Kimi K2SOSOSOCOSOCOSO
GLM 4.7 FlashXSOSOSO
MiniMax M2.5SOSOSOSO
GPT-6 LunaCOSOCOSOCOSOCO
Muse Glimmer 30BSOSOSOSOCOSOCO
SO SonarQubeCO CodeQLSO first choiceSO named as an alternativeSO argued againstblank: not namedEach cell is one answer, SonarQube on the left and CodeQL on the right.

The direct prompt

The plain question, one answer per model, grouped by where SonarQube and CodeQL stood in it.

SonarQube first, CodeQL not the choice

3 of 14 modelsCodeQL was named in the answer but not as the choice, or not at all.
Qwen 3.7 FlashSonarQube alternatives: Semgrep, Snyk Code
GLM 4.7 FlashXSonarQube alternatives: Checkmarx One, Codacy, DeepSource, GitHub Advanced Security, OpenText Fortify, Semgrep, Snyk Code, Veracode Static Analysis
Muse Glimmer 30BSonarQube alternatives: Semgrep

Neither was the first choice, one was named

3 of 14 modelsThe answer put something else first and named one of the two as an alternative.
Grok 4.1 FastSnyk Code alternatives: Semgrep, SonarQube
DeepSeek V4 FlashSnyk Code alternatives: CodeAnt.ai, Semgrep, SonarQube
Kimi K2Semgrep, Snyk Code alternatives: SonarQube

Neither was named

8 of 14 modelsThe answer made no first choice from these two in this category.
Claude Haiku 4.5no first choice
GPT-5.4 miniSemgrep alternatives: Checkmarx One, Snyk Code, Veracode Static Analysis
Gemini 3.5 FlashAikido Security alternatives: GitHub Advanced Security, GitLab SAST, Semgrep, Snyk Code
Perplexity SonarSemgrep alternatives: Checkmarx One, Snyk Code
Mistral SmallSnyk alternatives: Aikido Security, Semgrep
Llama 4 MaverickSnyk Code
MiniMax M2.5Snyk alternatives: Semgrep, Veracode Static Analysis
GPT-6 LunaSemgrep alternatives: GitHub Advanced Security, Snyk

Bold names in an answer are the products the judge labeled a first choice; a model naming several gives each of them that label. The full answer text for every row is in the record.

By buyer segment

The same question asked on behalf of a different buyer. Each standing is computed within its segment and they are never added together. The figures above are the mid-market standing, which is the one the category orders by.
Small business
SonarQube leads by fourteen points.
SonarQube14%#2 of 13
CodeQL0%#8 of 13
The full small business standing →
Mid-marketThe figures above
SonarQube leads by eighteen points.
SonarQube22%#2 of 10
CodeQL4%#5 of 10
The full mid-market standing →
Enterprise
SonarQube leads by seven points.
SonarQube9%#3 of 10
CodeQL2%#7 of 10
The full enterprise standing →

What the models said about SonarQube

Every negative label with a quote, up to three, then the highest-weighted positives, up to three. Six of eight in this category shown.

“Noisiest out-of-box (40-60%+ FPs on Java/TS; OWASP F1-score ~27% in some evals)... avoid for security-only if you can't invest in config” Grok 4.1 Fast · negative prompt · hard negative
“Tools originally designed for *general code quality* (like SpotBugs, SonarQube's default rules) are often very weak at security-specific detection” DeepSeek V4 Flash · negative prompt · soft negative
“A code-quality scanner treated as comprehensive security coverage... verify the actual security rules for your languages, frameworks, and edition.” GPT-6 Luna · negative prompt · soft negative
“The best SAST tool for a company with a limited budget is Semgrep's free tier, SonarQube Community, Snyk Code's Team plan, or DeepSource.” Llama 4 Maverick · budget prompt · first choice
“The Best All-Around Choice: SonarQube (by SonarSource) This is the most balanced recommendation for most mid-sized companies.” Qwen 3.7 Flash · paraphrase prompt · first choice
“For many mid-sized B2B companies, SonarQube or Snyk offer good balance between cost, ease of use, and effectiveness.” Claude Haiku 4.5 · paraphrase prompt · first choice

What the models said about CodeQL

Every negative label with a quote, up to three, then the highest-weighted positives, up to three. Six of seven in this category shown.

“CodeQL requires a subscription to GitHub Advanced Security (GHAS), which is highly enterprise-focused and expensive” Gemini 3.5 Flash · budget prompt · soft negative
“CodeQL (A "Proceed with Caution" for Closed-Source Teams) ... GHAS licensing, which can be prohibitively expensive” Gemini 3.5 Flash · negative prompt · soft negative
“CodeQL if your stack or plan doesn't fit: Check language support before adopting it” GPT-6 Luna · negative prompt · soft negative
“GitHub CodeQL – Free for public repositories ... It provides deep code analysis and is widely used for finding vulnerabilities in multiple languages.” Mistral Small · budget prompt · first choice
“my default recommendation would be GitHub CodeQL if you already use GitHub” GPT-5.4 mini · paraphrase prompt · first choice
“Lower noise: CodeQL (semantic, low FPs)” Grok 4.1 Fast · negative prompt · first choice
Also compared

Comparisons are drawn for the top eight products in each category, each against each. The output is the models' output; nothing here is a recommendation by the index.