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
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.
Catch issues before merge
The best time to fix quality debt is while the pull request context is still fresh. In GitHubโs engineering organization, teams resolve 67.3% of Code Quality findings before merge.
- Set the bar first โ configure a ruleset quality gate so changes below your standard cannot be merged.
- Open a PR โ it triggers rules-based and AI-assisted analysis, and findings land inline with an explanation and a suggested change.
- Resolve โ apply the autofix, dismiss with a reason, or delegate broader remediation to Copilot.
- The gate holds โ the PR stays blocked until the required findings are resolved.
- ๐ Bonus โ fix an alert straight from the Security tab, or open a campaign to work through the backlog in an organized way.
โก Fixing findings in the PR prevents a second remediation PR and keeps the default-branch backlog clean.
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.