# SonarQube vs CodeQL: which do AI models recommend for SAST, October 2026

IT AI Recommendation Index, October 2026 Edition, Static application security testing. Three of fourteen models named SonarQube first on the direct prompt; zero named CodeQL. Page: https://it-ai-index.com/developer/static-application-security-testing/sonarqube-vs-codeql/

| | First-choice share | Rank | Negative rate | Labels | Models naming it |
|---|---|---|---|---|---|
| SonarQube | 22% | #2 of 10 | 18% | 62 | 14 of 14 |
| CodeQL | 4% | #5 of 10 | 11% | 27 | 11 of 14 |

## The direct prompt, model by model

- Qwen 3.7 Flash: sonarqube first (first choices: SonarQube) (alternatives: Semgrep, Snyk Code)
- GLM 4.7 FlashX: sonarqube first (first choices: SonarQube) (alternatives: Checkmarx One, Codacy, DeepSource, GitHub Advanced Security, OpenText Fortify, Semgrep, Snyk Code, Veracode Static Analysis)
- Muse Glimmer 30B: sonarqube first (first choices: SonarQube) (alternatives: Semgrep)
- Grok 4.1 Fast: neither first, one named (first choices: Snyk Code) (alternatives: Semgrep, SonarQube)
- DeepSeek V4 Flash: neither first, one named (first choices: Snyk Code) (alternatives: CodeAnt.ai, Semgrep, SonarQube)
- Kimi K2: neither first, one named (first choices: Semgrep, Snyk Code) (alternatives: SonarQube)
- Claude Haiku 4.5: neither named
- GPT-5.4 mini: neither named (first choices: Semgrep) (alternatives: Checkmarx One, Snyk Code, Veracode Static Analysis)
- Gemini 3.5 Flash: neither named (first choices: Aikido Security) (alternatives: GitHub Advanced Security, GitLab SAST, Semgrep, Snyk Code)
- Perplexity Sonar: neither named (first choices: Semgrep) (alternatives: Checkmarx One, Snyk Code)
- Mistral Small: neither named (first choices: Snyk) (alternatives: Aikido Security, Semgrep)
- Llama 4 Maverick: neither named (first choices: Snyk Code)
- MiniMax M2.5: neither named (first choices: Snyk) (alternatives: Semgrep, Veracode Static Analysis)
- GPT-6 Luna: neither named (first choices: Semgrep) (alternatives: GitHub Advanced Security, Snyk)

## What the models said about SonarQube

- "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

- "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)

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. Comparisons are drawn for the top eight products in each category. Published under CC BY 4.0; the output is the models' output, and nothing here is a recommendation by the index.
