GitHub scans the code your pull request never touched

GitHub outlined how developers can check code for vulnerabilities as they write it, review pull requests before merging, and scan existing code. The company said it detected more than 200 million vulnerabilities from January through October 2026, citing internal data.

In an ArmorCode survey of 200 senior security and technology leaders, 40% chose the volume of AI-generated code awaiting human review as their top software security challenge. A separate Flux survey found that nearly half of respondents’ organizations ran AI-generated code in production. More than 80% had changed their development or release processes, most often by updating AI use policies.

Production monitoring adds another checkpoint. A New Relic study found that AI-generated code introduced nearly twice as many critical runtime issues as peer-reviewed code written by engineers. Some issues become apparent under production traffic or when code interacts with other services.

“That’s why GitHub combines built-in security checks with different kinds of analysis and gives you ways to investigate findings and apply fixes where you’re already coding,” Pierre Tempel, Director, Product Management at GitHub, explained.

Reviewing code before a pull request

Developers can run /security-review in the Copilot app, Copilot CLI, or Copilot Chat in VS Code. The review examines local changes, prioritizes findings, and suggests fixes. Developers can ask Copilot to explain a finding or try a fix in the working copy.

A PHP search endpoint that inserts user input into a SQL query can be vulnerable to SQL injection. A local review could flag the issue and suggest a parameterized query, which treats the search term as data. Developers can then test that searches work as expected and that user input cannot alter the query.

GitHub added automatic security and quality checks to its Copilot coding agent in October 2025. The agent scans the code it generates with CodeQL, checks new dependencies against the GitHub Advisory Database, looks for exposed secrets such as API keys and tokens, and reviews its changes for quality issues. If a check flags a problem, the agent attempts a fix and reports what it did in the pull request summary.

Checking pull requests before merging

Pull request checks can catch issues introduced after a local review, including changes committed by reviewers. CodeQL builds a model of the code and queries it for vulnerability patterns. GitHub’s AI Scanning examines how the code behaves, looks for flaws in business logic, and covers additional languages such as PHP.

Scanning existing code

Developers with repository write access can run Standard AI Scan on the default branch. The scan selects files and functions to examine within a time limit and covers languages beyond those supported by CodeQL.

GitHub pull request checks

Open security extension (Source: GitHub)

Findings appear alongside CodeQL alerts in the code scanning backlog. GitHub suppresses AI Scan findings that duplicate existing CodeQL alerts. Teams can assign alerts, link them to issues, and use autofix where supported. The GitHub security extension brings those alerts into the Copilot app, where developers can ask for explanations and work on fixes.

Deep Scan for releases and audits

“For most work, the checks you’ve seen so far are enough. But regular scanning is built to work within practical limits, such as time and scope. In some situations, such as a major release or an audit, you can’t afford to leave any stone unturned,” Tempel continued.

Deep Scan is in private preview for release testing and security audits. It uses Microsoft’s Codename MDASH and runs on demand. Its alerts join CodeQL and Standard AI Scan findings in the same backlog. GitHub’s agentic autofix can propose changes for findings from all three tools and from supported partner tools.