What happens when AI writes most of your code and security still needs you?
GitHub now detects over 200 million vulnerabilities in ten months. The company has layered four different checks that run from your laptop to the release branch.
The agent finishes its task. Tests pass. Code looks plausible. You still don't know if it's safe.
From January to October 2026 GitHub detected over 200 million vulnerabilities based on internal data. That number represents a 100 percent increase year over year. The scale changes what a review can catch by hand.
The agent says it's done — what did it miss?
A local security review runs before you open a pull request. Type /security-review in the Copilot app, Copilot CLI, or Copilot Chat in VS Code. The command scans only your active changes. It returns prioritized findings with remediation suggestions. It does not edit your code.
Imagine an agent updates a PHP search endpoint. It builds the database query by inserting the search text directly into the SQL. Ordinary searches still work. The vulnerability appears only when crafted input alters the query itself. The local review flags SQL injection and suggests a parameterized query. You apply the fix. You test. Ordinary searches still work. Crafted input can no longer alter the query.
The pull request is open — what could still slip through?
Reviewers can suggest and commit changes of their own. Any one of those changes could introduce a new risk. CodeQL and AI Scanning run on every pull request before code gets merged.
CodeQL builds a database representing the code. It runs queries over that representation. Its default query suite targets high precision and few false positives. AI Scanning uses agents to explore the repository and reason about how the code works. It investigates unfamiliar attack patterns and vulnerabilities in business logic. It covers additional languages outside CodeQL coverage. PHP is one of those languages.
For the example endpoint AI Scanning checks it on the pull request. Findings come with suggested fixes for you or your reviewers to evaluate.
The code you didn't touch — Standard AI Scan
Pull request checks examine new or changing code. They do not scan what is already there. Older code can go unchecked for months or years. Even code that appeared safe when it shipped may not hold up as attackers find new techniques.
An older part of the application builds database queries too. Nobody has changed it in months. It may carry the same risk as the endpoint you just fixed. No pull request will ever bring it up for review.
If you have write access to a repository you can run Standard AI Scan on its default branch. The scan uses a proprietary harness with multiple models when available. Its agent searches the project and selects files and functions to examine within a time budget. It examines languages CodeQL supports as well as those outside its coverage.
When the scan finishes findings appear alongside CodeQL alerts in the code scanning backlog. When CodeQL alerts already cover the same issue AI Scan suppresses the duplicate findings. You can assign these alerts, link issues, include them in security campaigns, and use supported autofix workflows.
Inside the Copilot app the GitHub security extension brings all code scanning alerts into a security canvas. You can find alerts, ask Copilot to explain them, and work on fixes without leaving the app. The same canvas supports the local security review used earlier.
The critical release — Deep Scan
Regular scanning works within practical limits of time and scope. Some situations demand more. A major release. An audit. You cannot afford to leave any stone unturned.
Deep Scan is powered by Microsoft's Codename MDASH. It is currently in private preview. It is intended for higher-attention situations such as release testing and audits. Like Standard AI Scan you run it on a repository with a click.
All three alert types share the same backlog. All come with fix suggestions. Agentic autofix works across all three as well as partner tools. It helps you turn findings into fixes within a shared workflow.
How they connect
Local review catches problems while you build. Pull request checks catch problems before merge. Standard AI Scan catches problems in code nobody touched. Deep Scan catches problems when the stakes are highest.
No single green check certifies the whole codebase. Together these approaches give you more chances to find issues and a clearer path from a finding to a fix you have reviewed.
The feature table GitHub publishes lists four rows. Local security review for active changes before a pull request. CodeQL and AI Scanning for new or changed code before merging. Standard AI Scan for the default branch. Deep Scan for release testing or audits.
Next time you work with an agent run /security-review in the Copilot app, Copilot CLI, or Copilot Chat in VS Code. Check your changes for vulnerabilities before opening a pull request.
The sources this article was written from
- "GitHub Blog
https://blog.github.com/security/application-security/how-do-you-build-securely-when-ai-is-writing-more-of-the-code/"