In a nutshell
Code Quality stops reliability and maintainability problems from becoming tomorrow's technical debt.
It combines CodeQL rules + AI-assisted analysis, suggests fixes in pull requests, measures repository health, and can block merges that miss your quality bar.
What Code Quality covers 📖 Docs
Generally available since July 20, 2026. Its job is to keep code reliable, maintainable, and covered by tests as it ages. It is a standalone product that sits next to GitHub Advanced Security, not a feature bundled inside it.
🔑 Use both: Code Scanning protects against exploitable risk; Code Quality protects long-term code health.
Language support 📖 Docs
Rule-based CodeQL analysis covers 6 languages only: C#, Go, Java, JS/TS, Python, Ruby. C/C++, Swift and the rest get AI analysis and coverage, nothing more.
| Feature | ✅ 6 CodeQL languages | ⚠️ C/C++ and others |
|---|---|---|
| 🔍 CodeQL findings + Autofix on PRs | ✅ | ❌ |
| 📋 Standard findings on the default branch | ✅ | ❌ |
| 🤖 Agentic Autofix | ✅ | ❌ |
| 🚧 Quality gate on findings | ✅ | ❌ |
| 🧠 AI analysis (recently changed files) | ✅ | ✅ |
| 🧪 Coverage (Cobertura XML) | ✅ | ✅ |
💡 Only CodeQL findings show up on pull requests. For C/C++ PR reviews, add Copilot code review ↗ (a separate product).
Catch issues before merge
When AI writes most of the code, a ruleset quality gate on every PR is what holds the bar. GitHub’s teams fix 67.3% of findings before merge (GitHub, 2026 ↗).
| 🟢 Gate on every PR | 🔴 No gate | |
|---|---|---|
| 🤖 Agent | Its blind spots get caught | Its blind spots get merged |
| 🔧 Fix | Autofix in the same PR | Cleanup PR later, if ever |
| 📉 Codebase | Stays at your bar | Debt hits the next agent |
- 🐛 Riskier edits: AI edits on unhealthy code carry 30%+ higher defect risk (FORGE 2026 ↗)
- 🪙 Costlier reads: the least healthy code takes ~45% more input tokens to read (Java / C++, SCAM 2026 ↗)
Agentic Autofix 📖 Docs
A fix PR for your backlog, not just a suggested patch.
| Step | What happens |
|---|---|
| 🎯 Select | Security and quality → Code quality → Standard findings. Select 1–25 findings on one page: CodeQL findings on the default branch. |
| 🤖 Delegate | Assign to Copilot: cloud agent edits a branch, validates changes, and opens a PR. Replaces Generate fix, even for one finding. |
| 👀 Review | Review the proposed fixes and CI results, then merge. The agent does not replace human review. |
- 🛂 Access: Code Quality enabled on Team / Enterprise Cloud (data residency included). Existing enterprise policy; no separate bulk setting.
- 💳 Cost: AI credits + a Copilot license for delegation.
Enable and roll out 📖 Docs
Enablement is a three-level cascade
- 🏛️ Enterprise —
Policies → Code qualityallows organizations to use it - 🏢 Organization —
Settings → Code quality → Repository accesspicks the repositories in scope - 📦 Repository —
Settings → Code quality → Enable code qualityturns the scans on
Before you switch it on
- ⚙️ GitHub Actions — deterministic CodeQL scans run as Actions workflows
- 🏃 Runners — GitHub-hosted, or self-hosted with the expected label
- 🧪 Coverage — upload Cobertura XML from your existing test workflow
- 🧭 Gates — start rulesets in evaluate mode, then switch to merge blocking
▼ gh-code-quality-inventory.sh Give it an enterprise slug: it walks every organization and reports which repositories have Code Quality enabled ./gh-code-quality-inventory.sh <enterprise>🏢 Rollout can only be checked per organization. The dashboard and “Repository access” are organization-scoped; the enterprise level only shows the policy allow-list and consumed licenses.
GA availability and billing
Available on GitHub Enterprise Cloud and GitHub Team.
▸ + UNFOLDS THE DETAIL FOR THAT COST LINE
Measure quality over time
Pull-request enforcement stops new debt. Dashboards and APIs tell you where the existing debt already lives.
- 📊 Repository and organization dashboards — reliability and maintainability scores across repositories, so you can see which ones carry the most debt
- 🧪 Coverage on pull requests — render existing Cobertura XML reports and show whether coverage improves or drops
- 🔌 APIs — manage repository enablement and retrieve findings for your own reporting
🎯 Dashboards tell you where quality debt lives; rulesets stop teams from adding more.