> guide · code scanning

CodeQL alternatives (2026)

Static analysis that covers what CodeQL doesn't, or replaces it entirely, ranked for small teams shipping fast.

CodeQL is excellent at what it does: deep semantic analysis for C/C++, C#, Go, Java/Kotlin, JavaScript/TypeScript, Python, Ruby, Rust, Swift and GitHub Actions workflows. GitHub's own docs are clear that it doesn't support anything else, PHP included. People usually look for an alternative for one of three reasons: an unsupported language, wanting rules that are easy to write, or not wanting to pay for GitHub Code Security on private repos.

← All tier lists · FAQ

Last updated:

Some links elsewhere on ToolTier are affiliate links that may earn us a commission at no extra cost to you. None of the links on this page are, and affiliate status never affects a tool's tier.

Quick picks

The picks

Our pick

Semgrep

The most flexible replacement. Rules look like the code they match, so writing a custom check takes minutes, not a query language. Semgrep Code supports 35+ languages, with PHP and Terraform generally available and Bash and Dockerfiles experimental. Works on GitHub and GitLab, in CI or the IDE.

🎯 Best for: Custom rules, polyglot repos💲 Free: up to 10 contributors, 10 private repos · Teams: Code $30/contributor/mo

Official site ↗

Also good

Snyk Code

Developer-friendly SAST with IDE, CLI and pull request integrations, from the same platform as Snyk's dependency, IaC and container scanning. Its docs list PHP 5.2–8.0 support with Laravel and Symfony framework coverage.

🎯 Best for: One vendor for code plus dependencies💲 Free plan · Team from $25/mo (teams up to 10 developers)

Official site ↗

Also good

SonarQube

Code quality and security in one report. SonarQube Cloud's Team plan covers 30+ languages including PHP, Shell, Terraform and Docker, and the free IDE extension flags issues as you type. Strongest if you care about maintainability as much as vulnerabilities.

🎯 Best for: Quality gates plus security💲 Free up to 50k private lines of code, free for public OSS · Team plan priced by lines of code

Official site ↗

Stay on GitHub

GitHub AI Scan for PRs

GitHub's own answer to CodeQL's gaps, GA since Oct 15. It scans PR changes in PHP, Bash, Terraform, Dockerfiles, JSP and Blazor, shows findings next to CodeQL alerts, and suggests autofixes. Findings are advisory only: they can't fail the check or block a merge.

🎯 Best for: Keeping everything inside GitHub💲 Free on public repos · private repos need Code Security ($30/active committer/mo) or Advanced Security; usage billed in AI credits

Official site ↗

Add-on

CodeRabbit

An AI pull request reviewer, not a SAST engine, but its reviews include security checks across static analysis, secrets, dependencies and infrastructure. A useful second set of eyes on top of any scanner here.

🎯 Best for: AI review on every PR💲 Free for public repos · Essentials $24/user/mo billed annually

ToolTier review · Official site ↗

Side by side

ToolTypeCovers PHP?Also scansFree option
SemgrepSAST + SCA + secretsYes (GA)Dependencies, secrets, TerraformUp to 10 contributors
Snyk CodeSASTYes (5.2–8.0)Dependencies, IaC, containers (other Snyk products)Free plan
SonarQubeQuality + SASTYesCode quality, Shell, Terraform, Docker50k private LOC; public OSS
GitHub AI Scan for PRsAI PR scanYesBash, Terraform, DockerfilesPublic repos
CodeRabbitAI code reviewReviews PR changesSecrets, dependencies, infra checks in reviewPublic repos
CodeQL (baseline)Semantic SASTNoGitHub Actions workflowsPublic repos

Pick by situation

PHP or other unsupported language: Semgrep or Snyk Code. Want to keep CodeQL and fill gaps: turn on AI Scan for PRs, then add Semgrep if you need findings that block merges. Care about code quality too: SonarQube. Small team, tight budget: Semgrep's free plan covers up to 10 contributors.

How we picked

This is ToolTier's take, an editorial ordering rather than a formal tier. We built it from research and official docs and pricing pages, checked Oct 18, 2026. We weigh how fast you can get it running, how much it catches, how well it fits a small team's workflow, and price. No tool paid to be included, and none of the links on this page are affiliate links. How we rank.

FAQ

What is the best alternative to CodeQL?

For most teams, Semgrep: it supports more languages (including PHP), its rules are much easier to write, and it's free for up to 10 contributors. Snyk Code and SonarQube are strong if you also want dependency scanning or code quality reports.

Does CodeQL support PHP?

No. GitHub's documentation says CodeQL doesn't support languages outside its list, including PHP. Use Semgrep, Snyk Code or SonarQube for PHP, or GitHub's AI Scan for PRs.

Is GitHub AI Scan a replacement for CodeQL?

No, it complements it. AI Scan covers languages CodeQL misses and runs on pull requests, but its findings are advisory and can't block a merge.

Can I use Semgrep or Snyk with GitHub code scanning?

Yes. GitHub accepts SARIF uploads from third-party scanners, so results can show up alongside CodeQL alerts.

// built for builders

Ranking the rest of your stack?

ToolTier ranks AI coding agents, IDEs, app builders, hosting, backends and model APIs in S, A and B tiers, kept current daily.

See every tier list →   Coding Agents   AI Workflows   AI Code Review   AI IDEs   Deploy & Hosting

Related guides and tier lists

GitHub Advanced Security alternativesStatic analysis for Bash, Terraform and DockerAI Code Review tier listAI Coding IDEs tier listHow we rank

// weekly · free

The ToolTier Drop

New tools worth your time and tier changes, every week. No hype.