GitHub AI Scan now checks PHP, Terraform and Dockerfiles in pull requests
GitHub's AI Scan for pull requests is now GA. It flags vulnerabilities in PHP, Bash, Terraform and other code CodeQL skips, billed in AI credits.
GitHub made AI Scan for pull requests generally available on October 15, 2026, in a post on the GitHub Changelog. AI Scan is part of code scanning and looks for vulnerabilities in the code a pull request changes. It targets languages and frameworks that CodeQL, GitHub's existing analysis engine, does not cover today.
What AI Scan for pull requests adds
The GitHub Changelog announcement (opens in a new tab) names PHP, Shell/Bash, Terraform configuration (HCL), Dockerfiles, JSP for Java and Blazor for C#, and says there are more. The AI Scan documentation (opens in a new tab) gives the same names as examples and does not publish a full list.
AI Scan uses an AI-based engine and needs no build system or separate scanning tool. GitHub's docs say the engine may use code search for context. It follows GitHub's own specialized prompts and ignores custom instruction files such as .github/copilot-instructions.md or CLAUDE.md. Admins do not need to pick a model to enable AI Scan, and the docs do not name one.
The documentation lists nine detection categories, which GitHub says may change:
- string injection (SQL, HTML, shell, JSON or YAML built from unescaped strings)
- weak cryptography
- broken access control, such as path traversal or open redirects
- sensitive data exposure
- security misconfiguration
- authentication failures
- data integrity failures, such as unsafe deserialization
- server-side request forgery
- supply chain risks, such as unpinned actions, packages or images
How AI Scan findings show up on a pull request
AI Scan runs when a pull request is opened and again after each new commit. Findings sit next to CodeQL results on the Conversation and Files changed tabs, marked with an "AI" label. Each finding explains the issue and its risk. Most carry a suggested remediation, and Copilot Autofix proposes a code change when one is available.
AI Scan does not depend on CodeQL default setup. It keeps running if CodeQL fails or is still waiting, and it posts findings as it finds them, so they can arrive before or after CodeQL results.
The findings are advisory. They do not fail the code scanning check, and rulesets cannot use them to block a merge. AI Scan findings also live only on the pull request: they do not become backlog alerts in the repository's security view.
Who can use AI Scan and how it is billed
Availability depends on who owns the repository:
- Public repositories owned by an organization or a personal account: available.
- Private or internal organization repositories: need GitHub Code Security or GitHub Advanced Security.
- Private personal-account repositories: not available.
- Repositories in a managed user account's personal namespace: not available.
A GitHub Copilot license is not required. Usage is billed apart from active-committer licensing, under a SKU called Code Security AI Credits, and that applies to public repositories too. The GitHub Advanced Security billing page (opens in a new tab) says agentic autofix for code scanning draws on the same credits, while classic Copilot Autofix does not.
If the billed account has included AI credits from a Copilot entitlement, AI Scan spends those first, and anything beyond them is metered. Neither the changelog nor the billing page gives a price per credit. When a hard budget runs out, AI Scan stops producing findings until an administrator raises the budget or a new billing cycle starts.
How to turn on AI Scan
On GitHub Enterprise Cloud, enterprise owners first decide whether organizations may enable AI Scan. The default enterprise policy is "Not allowed", and allowing it does not switch it on.
The AI Scan docs say organization owners and security managers can enable AI Scan for eligible repositories. They open the organization's Settings, expand Advanced Security, choose Global settings and select AI Scan under code scanning, as the global settings guide (opens in a new tab) describes. Repositories inherit that setting, and repository admins can opt out one by one.
The docs warn that the organization setting takes effect at once. Qualifying pull requests can spend credits before a repository admin opts out, so GitHub advises reviewing included credits and setting budgets first. Admins of an organization-owned repository cannot opt in while the organization setting is off.
Admins of a public personal-account repository use the "AI Scan for pull requests" toggle under Code scanning. The organization and repository ai-scan setting can also be managed through the REST API. The Coverage view in security overview shows the effective status for each repository.
Limits and open questions about AI Scan
- AI Scan checks pull requests only. Full repository scans are not supported.
- Pull requests from forks and pull requests created by Dependabot are skipped.
- GitHub says findings may include false positives and asks users to report wrong results with the thumbs up or thumbs down control.
Several details are missing from GitHub's pages:
- The documentation does not say which model runs the scan, how scanned code is handled or retained, or whether diffs have size limits.
- Neither the changelog nor the docs page mentions GitHub Enterprise Server.
- GitHub publishes example languages and no full list, so teams cannot confirm in advance whether a given file type is covered.
Frequently asked questions
Who pays for AI Scan on a public repository in my personal account?
GitHub's documentation says usage on a public personal-account repository bills to that account. The exception is an owner whose Copilot license is provided by an organization or enterprise: then the usage bills to that provider. For organization-owned repositories, the account that handles the organization's billing pays.
Where can I see AI Scan spending and results?
The changelog says credit usage appears in the "AI usage" section of enterprise billing and licensing, under the "Advanced Security" product, and that SKU-level budgets can be set for Code Security AI Credits. For results, the Prevention tab of the security overview dashboard shows AI Scan finding trends and how often developers accept Copilot Autofix suggestions. An AI Scan tab in the "Code scanning on pull requests" report tracks findings over time.
Does AI Scan run on JavaScript, Python or other languages CodeQL already covers?
The documentation says AI Scan runs when a pull request changes code in a supported language or framework that CodeQL does not cover. The page does not describe AI Scan checking code in languages CodeQL already covers. GitHub points to its CodeQL documentation to check which languages CodeQL supports.
Sources
- 1.AI Scan for pull requests generally available - GitHub ChangelogOfficial docsPrimarygithub.blog
- 2.docs.github.com/enterprise-cloud@latest/code-security/concepts/code-scanning/ai-powered-security-detectionsOfficial docsPrimary
- 3.docs.github.com/billing/concepts/product-billing/github-advanced-securityOfficial docsPrimary
- 4.docs.github.com/en/enterprise-cloud@latest/code-security/how-tos/secure-at-scale/configure-organization-security/establish-complete-coverage/configure-global-settingsOfficial docsPrimary
Spotted an error? See our corrections policy.
Enjoyed this? Get the weekly brief.
New guides, Project & Tool of the Week and the AI developments that matter. One email, no spam.
Read next
GuideCoding & dev toolsPHP critical security update CVE-2026-109618: Versions and patch steps
Check the PHP critical security update CVE-2026-109618, identify affected servers, install fixed PHP versions, and apply temporary settings if needed.
12 min read
- GuideCoding & dev tools
Sandbox AI coding agent setup: permissions, containers and network limits
Set up a sandbox AI coding agent in Claude Code, Codex, Copilot or Docker, see what each boundary blocks, and spot the gaps it leaves open.
7 min read
- NewsCoding & dev tools
QGIS bans LLM, AI and agent-assisted code in its main repository
QGIS approved a policy that bans LLM, AI and agent-assisted code in qgis/qgis. What changed for contributors, how the vote went and what is still open.
5 min read