← Back to news
GitHub AI Scan: secure pull requests without delegating the decision

Photo: WOCinTech Chat / Wikimedia Commons — CC BY 2.0 (https://creativecommons.org/licenses/by/2.0/). Illustration; not a GitHub AI Scan screenshot.

16/10/2026

GitHub AI Scan: secure pull requests without delegating the decision

AI Scan moves security feedback closer to the pull request

On 15 October 2026, GitHub announced general availability of AI Scan for pull requests. For senior engineers, the useful development is not another promise that AI will secure software automatically. It is additional security feedback on changes in languages and frameworks that CodeQL does not currently cover, including PHP, Shell/Bash, Terraform configuration, Dockerfiles, JSP and Blazor. That puts the tool directly in the path of work that coding agents increasingly produce: deployment scripts, infrastructure changes and glue code around application features.

My engineering recommendation is straightforward: use AI Scan as an extra reviewer, not as your release authority. GitHub explicitly says its findings are advisory, do not fail the code scanning check and cannot block a merge through ruleset requirements. That distinction determines the rollout architecture. An AI finding can tell a developer where to investigate; a human owner and enforceable delivery controls must decide whether the change is acceptable.

What the tool does, and what it does not do

AI Scan is a hosted GitHub code scanning capability, not a package to install in your editor. When code scanning and the repository's effective AI Scan setting are enabled, eligible pull request changes trigger analysis. The documentation describes scans at pull request creation and after new commits. Findings appear beside CodeQL results in the Conversation and Files changed tabs, identified by an AI indicator. A finding can include an explanation of the risk and a suggested correction.

The engine works on pull request code without requiring a build system and can use code search to gather repository context. This is useful for repositories where compiling the application is expensive or where the risky change is configuration rather than a compiled component. It does not mean context is complete, that every vulnerability category is detected, or that a clean result establishes safety. This is another source of evidence, not a security proof.

Keep three products conceptually separate. CodeQL provides static analysis for its supported languages and queries. AI Scan adds advisory findings on eligible pull request changes outside that coverage. Agentic autofix is a different remediation workflow, announced separately, with its own prerequisites and scope. Do not assume an AI Scan finding automatically becomes a persistent security backlog alert or an independently validated remediation pull request.

Access, documentation and the rollout-status caveat

Start with the official announcement and documentation linked in the sources. There is no AI Scan binary, npm package or model download. Access is through GitHub repository and organization security settings, subject to account eligibility and enterprise policies. You do not choose a model to turn it on. For an engineer evaluating the feature, the installation task is therefore administrative: confirm entitlement, enable the right settings and validate behavior on a controlled repository.

The dated general-availability announcement says AI Scan is available for public repositories owned by organizations or personal accounts. Private and internal organization-owned repositories require GitHub Code Security or GitHub Advanced Security. It also says a GitHub Copilot license is not required. Usage consumes Code Security AI Credits; enterprise billing exposes usage under Advanced Security, and SKU-level budgets are available. Public-repository availability should not be confused with unlimited free usage.

There is a documentation discrepancy worth making explicit. When checked for this article on 16 October, the conceptual documentation still carried a public-preview notice and preview-era licensing language, while the 15 October announcement described general availability and different access conditions. Use the dated announcement for the release news, but confirm effective entitlement, policy labels and billing in your own account before rollout. Do not copy an old licensing assumption into a procurement decision.

A practical enablement sequence

Begin with a pilot repository that has relevant PHP, shell or infrastructure changes and maintainers who can assess the results. Avoid an enterprise-wide toggle as the first experiment. GitHub documents an enterprise AI Scan policy under Code Security, an organization setting under Code scanning, and repository-level controls. In enterprise-managed organizations, enterprise policy must permit the feature before organization administrators enable it. For an eligible personal public repository, the repository administrator enables it directly.

  • Confirm code scanning is enabled and that the effective AI Scan setting permits scanning for the pilot repository.
  • Identify the administrator responsible for enterprise policy, the organization setting and repository exceptions.
  • Set a usage budget and name the person who monitors it before generating repeated scan-triggering commits.
  • Open an internal, non-fork pull request with a qualifying change and inspect both review tabs for AI-labeled findings.
  • Record whether the scan ran, which commit was analyzed, what feedback appeared and who reviewed it.

An empty result needs interpretation. The change may be clean, ineligible, outside current coverage, excluded by policy, or simply not associated with a detected issue. Check effective settings and pull request origin before assuming a model missed a vulnerability. Keep existing CI checks enabled throughout the experiment. A pilot is meant to characterize the additional signal, not temporarily remove established protections.

Use case one: review the shell scripts agents tend to overlook

Consider a coding agent that implements an export feature and modifies the Bash script that packages its artifacts. The application diff is carefully reviewed, but the script now interpolates a user-influenced path into a command. AI Scan may provide a useful prompt to inspect this class of change because Shell/Bash is among the announced coverage areas. This is an illustrative review scenario, not a claim that a particular example was tested or will always produce a finding.

The reviewer should trace the input to its source, determine whether an attacker can influence it, inspect quoting and argument boundaries, and look for unsafe evaluation. Ask a coding agent to propose a minimal correction and regression tests, but verify the shell behavior independently. A convincing explanation about escaping is not equivalent to a safe command invocation. Include filenames containing spaces and metacharacters in tests where relevant, and retain a positive case for valid input.

The productivity opportunity is attention allocation: surface a risky script change while the author still remembers why it exists. The security decision remains with the engineer who understands the execution identity, environment and reachable inputs. Keep deployment credentials and production execution outside the review agent's reach.

Use case two: keep Terraform review connected to real permissions

An infrastructure pull request can look like ordinary configuration while broadening access to a storage resource or disabling a security control. Terraform configuration is in AI Scan's announced coverage. An AI-labeled comment can help a reviewer identify a change that deserves a deeper look, especially when a coding agent has generated a large amount of plausible HCL around a small application request.

Use that signal to inspect the actual Terraform plan, provider behavior, identity boundaries and intended environment. Check whether the resource is public, whether a wildcard is necessary, and whether the configuration inherits a compensating control from another module. An isolated line can be dangerous or harmless depending on those relationships. Ask for a scoped fix, then compare the resulting plan against the original intent rather than accepting a textual diff alone.

AI Scan should complement, not replace, infrastructure policy checks and explicit plan approval. A required policy check can enforce a known prohibition; an advisory AI comment cannot become a merge gate merely because it sounds severe. Separate detection, investigation, permission to merge and permission to apply. Those are different steps with different owners.

Use case three: investigate PHP changes with application context

A PHP endpoint that assembles a query or fetches a supplied URL is another useful pilot candidate. GitHub documents detection categories including string injection, broken access control and server-side request forgery. Treat these as categories the engine addresses, not a guarantee that every endpoint or framework pattern is understood. The first question is whether the finding describes an exploitable path in this application.

Trace the request data through validation, authorization, database access or network access. For a query issue, verify the parameterization strategy instead of merely adding escaping. For a URL-fetch issue, examine destination validation, redirects and the network boundary. For authorization, test a user who should not have access as well as the intended user. These checks require knowledge that may not be visible in the changed lines.

A coding agent can prepare the patch and candidate tests once the human has established the threat model. Review the tests for meaningful assertions: they should fail for the vulnerable behavior and succeed for the intended behavior. A test that only asserts a successful response can conceal a missing access-control check. Preserve that regression test even if the AI finding disappears after a commit.

Use case four: review containers and supply-chain shortcuts

Dockerfiles are included in the announced language and configuration coverage, and the documentation lists supply-chain risks among detection categories. That makes container changes a useful place to evaluate signal: an agent may add a download step, choose a floating image tag, or introduce an installation shortcut that optimizes build success rather than reproducibility. None of these patterns guarantees an AI Scan finding; they are sensible human review targets.

Inspect where artifacts come from, how integrity is established and which privileges are needed during build and runtime. Evaluate pinning in the context of an update process: pinning without a maintenance plan can leave a vulnerable dependency indefinitely frozen. Keep image scanning, dependency review and reproducible build controls as separate mechanisms. AI Scan is not a substitute for analyzing the built image or the complete dependency inventory.

The useful output of review is a concrete decision: an approved source and integrity strategy, a narrower privilege boundary, or an explicitly tracked exception with an owner. Avoid converting every AI comment into a broad modernization project. Small, auditable changes are easier to validate and less likely to consume the time the tool was meant to save.

A repeatable human-controlled triage loop

For every finding, ask the author to summarize the suspected vulnerability in plain language: controllable input, affected operation, missing protection and plausible consequence. Then have a reviewer confirm or challenge that chain using repository evidence. If the finding is valid, assign a minimal fix and a regression test. If it is inaccurate, record why and use the available feedback mechanism. An unsupported dismissal and an unexamined acceptance are equally weak review practices.

Use a consistent review note: finding location; affected commit; exploit preconditions; proposed change; test evidence; residual risk; named approver. This is a team practice, not a claim about mandatory AI Scan fields. It makes the handoff between author, security specialist and release owner legible. When changes evolve, check that the decision still describes the final diff rather than an earlier version.

Keep security policy in enforceable systems. The documentation says AI Scan uses specialized prompts and does not use custom instruction files such as CLAUDE.md or .github/copilot-instructions.md. Writing a stronger instruction in either file will not turn the scanner into your organization's policy engine. Use repository permissions, required reviews and deterministic checks for rules that must hold on every merge.

Coverage gaps and failure modes to plan around

GitHub explicitly excludes pull requests from forks and pull requests created by Dependabot. AI Scan analyzes pull requests rather than performing full repository scans, and its findings do not become backlog alerts in the repository security view. Those boundaries matter for open-source contribution flows and dependency updates. Do not advertise coverage across all changes if a substantial proportion of your contributions arrive through excluded paths.

Expect both false positives and false negatives. A true-looking warning can ignore framework guarantees; a clean scan can miss a vulnerability spread across services or dependent on runtime configuration. Repository comments and code are also inputs to an AI-based system, not authority to approve changes. Keep the reviewer skeptical of confident explanations, and never transfer secrets into a prompt just to make an investigation easier.

Feedback can also become noise. If every finding interrupts the same senior engineer, the workflow has moved the bottleneck rather than removed it. Give authors an initial triage checklist, reserve specialist escalation for unclear or high-impact cases, and periodically review recurring patterns. The objective is a stronger development loop, not an ever-growing stream of advisory comments.

Measure useful productivity, not the number of comments

Run a time-bounded pilot and compare similar changes before and after adoption. Record time to first actionable security feedback, confirmed findings, investigation time, remediation review time and credit usage. Also track how many eligible pull requests actually received analysis and how many changes were outside scope. Without that denominator, a low finding count can mean either safer changes or poor coverage.

Do not publish a percentage productivity gain unless you have measured it. The plausible gains are earlier discovery, less manual scanning of repetitive configuration changes and shorter handoffs between implementation and security review. The costs include false-positive triage, additional commits, credit consumption and reviewing AI-suggested fixes. Compare the whole loop, including human verification, rather than only the time needed to generate a patch.

Decide in advance what would justify expansion: useful confirmed findings in previously under-reviewed changes, manageable review effort, clear ownership and predictable spend. If those conditions are not met, narrow the pilot or pause it. AI Scan is most valuable when it improves a team's decisions without pretending to make those decisions. Let the tool inspect more changes; let engineers retain responsibility for what ships.