GitHub AI security tools aim to catch flaws in AI-written code
GitHub says its security checks combine CodeQL, local Copilot reviews and AI scanning. The company reported more than 200 million vulnerabilities detected from January to October 2026.

Key takeaways
- GitHub says it detected more than 200 million vulnerabilities from January to October 2026, a 100% rise year on year.
- The security-review command runs on local changes in the Copilot app, Copilot CLI or Copilot Chat in VS Code, and does not edit code.
- CodeQL handles pull request checks, while AI Scanning extends coverage to languages such as PHP that CodeQL does not support.
- Deep Scan, powered by Microsoft's Codename MDASH, is in private preview and aimed at releases and audits.
In this article
What GitHub announced

GitHub has set out how developers can check code that AI agents write for them. The GitHub Blog published the guidance on 2 December 2026. It describes a chain of checks that runs from the agent session to the pull request and then the wider repository.
The company says agents can speed up development but may also add vulnerable code, expose secrets or name software packages that do not exist. A pull request is a proposed set of code changes that others review before it is merged.
According to GitHub, its own internal data shows more than 200 million vulnerabilities detected between January and October 2026. The company says that is a 100% rise on the year before. That figure comes from GitHub and has not been independently checked.
The local security review
The first checkpoint sits on the developer's own machine. GitHub says a change can pass every test and still be unsafe, because tests rarely ask why the code was written a certain way.
Its example involves an agent that rewrites a PHP search endpoint. The agent puts the search text straight into a SQL query, which is the language used to ask a database for data. Normal searches keep working, so only a close read reveals the risk that the input could change the query itself.
Developers can run a command named security-review in the Copilot app, the Copilot command line tool, or Copilot Chat in VS Code. The review covers local changes only, not a whole repository, and it does not edit the code. Findings come back in priority order with suggested fixes.
Checks on the pull request
The pull request is the next checkpoint. GitHub notes a weak spot here: reviewers can commit their own changes, and any of those could add a fresh risk. A check that runs on every pull request is therefore still needed.
CodeQL forms the base of the pull request checks in GitHub Code Security. It builds a database that represents the code and then runs queries against it. GitHub says the default query set is tuned for precision and for few false positives, meaning few warnings that turn out to be wrong.
AI Scanning adds a second layer. It uses agents to explore a repository and reason about how the code behaves, rather than relying only on fixed queries. GitHub says it can look at unfamiliar attack patterns and at business logic, and it covers languages that CodeQL does not. PHP is one of those languages in the example.
Scanning code nobody has touched
Pull request checks look only at new or changed code. Older files can go unexamined for months or years, and code that seemed safe at release may fail against newer attack methods.
For that older code, anyone with write access to a repository can run Standard AI Scan on its default branch, the main line of development. GitHub says the scan uses a proprietary harness, or wrapper, that calls several models when they are available. Its agent searches the project and picks files and functions to inspect within a set time budget.
Results land in the same backlog as CodeQL alerts, and duplicates are suppressed where CodeQL already reports the issue. From there alerts can be assigned, linked to issues, grouped into security campaigns, or handled by supported autofix workflows.
Deep Scan and what it means
For higher stakes work, such as a major release or an audit, GitHub points to Deep Scan. It is powered by Microsoft's Codename MDASH and is currently in a private preview, which means access is limited while testing continues. Like Standard AI Scan, it is started on a repository with a click.
Alerts from CodeQL, Standard AI Scan and Deep Scan share one backlog and all come with fix suggestions. Agentic autofix, meaning fixes proposed and applied by an agent, works across the three and with partner tools. In the Copilot app, a GitHub security extension gathers code scanning alerts into a single security canvas.
The practical point for teams is that judgement still sits with people. GitHub says the aim is to find vulnerabilities and then evaluate and apply fixes without moving between disconnected tools. Readers should check GitHub's own documentation for current availability and requirements.
Sources
Spotted a mistake? See our corrections policy. Read how News by OnDevice works in our editorial policy.



