GitHub Agentic Autofix and AI Scan Hit GA: Copilot Now Drafts PRs for CodeQL Alerts
GitHub today made Agentic Autofix and AI Scan for Pull Requests generally available. Copilot now reads a code-scanning alert, drafts a fix, reruns CodeQL against the patched code, and opens a draft PR. AI Scan extends language coverage to PHP, Bash, Terraform, and Dockerfiles. Both consume AI Credits from the Code Security budget. The biggest practical change: security teams can now process 25 alerts at a time with a single approval.
GitHub today made Agentic Autofix and AI Scan for Pull Requests generally available. Copilot now reads a code-scanning alert, drafts a fix, reruns CodeQL against the patched code, and opens a draft PR. AI Scan extends language coverage to PHP, Bash, Terraform, and Dockerfiles. Both consume AI Credits from the Code Security budget.
The biggest practical change is throughput. The per-alert workflow — alert raised, security engineer triages, engineer writes fix, engineer opens PR, PR reviewed, PR merged — has been the bottleneck on every security team I've talked to. Agentic Autofix compresses the first five steps. The sixth step (human review) stays.
Key Takeaways: What Matters Most?
- Agentic Autofix and AI Scan for Pull Requests are now generally available on GitHub
- Copilot reads a code-scanning alert, drafts a fix, reruns CodeQL against the patched code, and opens a draft PR
- AI Scan extends language coverage to PHP, Bash, Terraform, and Dockerfiles — beyond the JavaScript, Python, Java, and C# coverage at public preview
- Both features consume AI Credits from the Code Security budget — GitHub Enterprise Cloud customers can opt in without a separate Copilot license
- Batched fix mode handles up to 25 alerts in a single run; the practical ceiling for security teams is now throughput, not per-alert latency
How It Works
The flow is straightforward.
- A CodeQL alert fires on a pull request or a scheduled scan.
- Agentic Autofix reads the alert, the file with the flagged code, and the surrounding context.
- Copilot drafts a fix.
- CodeQL re-runs against the patched file. If the alert is cleared, the fix moves forward. If the alert persists, Agentic Autofix either iterates or surfaces the failure to the security team.
- Agentic Autofix opens a draft pull request with the fix, the alert reference, and a Copilot-generated commit message.
- A human reviewer (typically the original code author or a security engineer) reviews, requests changes, or merges.
The validation step is the part that matters. A Copilot draft that is not re-checked against the same scanner that raised the original alert is just a confident guess. GitHub's re-run of CodeQL against the patched file is the architectural commitment to "the fix is verified, not just plausible." That is the difference between a useful tool and a confident hallucination.
The Language Coverage
At public preview in May 2026, AI Scan covered JavaScript, TypeScript, Python, Java, and C#. The GA release adds:
- PHP (web frameworks, CMS, server-side rendering)
- Bash (shell scripts, deployment automation)
- Terraform (infrastructure as code)
- Dockerfiles (container build configurations)
The Dockerfiles and Terraform coverage is the most operationally significant. Misconfigured Dockerfiles and Terraform are responsible for a large share of the cloud security incidents that show up in incident postmortems — over-permissioned IAM, exposed secrets, public S3 buckets, default credentials. The ability to scan and fix at the PR stage, before the configuration reaches the cloud, is a real shift in the security review workflow.
Why This Matters
The per-alert bottleneck is gone. Security teams have been operating under a queue-model: alerts come in faster than engineers can triage them, the queue grows, the most severe alerts are deprioritized because there is no room in the queue. Agentic Autofix removes the queue for the most common alert types — those that have a deterministic fix pattern. The engineering team now reviews fixes, not alerts. The queue shifts from "alerts to triage" to "PRs to review," and the PR-review queue is a queue the team is already good at operating.
Batched fix mode is the operational feature. The 25-alert batch limit is the part that actually changes how security teams work. A team that can clear 25 alerts in a single run with a single approval flow can operate on alert backlogs that previously sat unprocessed for months. The throughput ceiling is now licensing and review capacity, not per-alert engineering time.
AI Credits from the Code Security budget is the right pricing. Pulling Agentic Autofix and AI Scan from the same budget that already pays for CodeQL means there is no separate procurement cycle for a Copilot license. For GitHub Enterprise Cloud customers, the decision is "do we want to enable this on our existing Code Security entitlement," not "do we want to add another vendor." The reduced procurement friction is part of the GA story.
The security review surface is now larger. Every Copilot-generated fix is a draft PR, and every draft PR is a place where a human engineer has to think carefully about whether the fix is correct. That is a real cost. The fix is verified by CodeQL re-run, but CodeQL only checks what CodeQL checks. Semantic correctness, edge cases, and the right architectural approach are not part of the verification. The human review step is not optional in practice.
The Trade-Off
Agentic Autofix is a fix-drafting tool, not an autonomous fix-deploying tool. Every PR is a draft. Every draft needs review. The model that security teams should use is "AI does the typing, humans do the thinking." The teams that get the most value from this feature will be the ones that already have a fast PR-review process for security fixes. The teams that get the least value will be the ones whose PR-review process is the actual bottleneck — in which case the AI does not help, the queue just changes shape.
The language coverage is broad but not complete. COBOL, Fortran, Perl, Lua, and several other long-tail languages are not supported. The most common enterprise languages are covered, and the most common infrastructure-as-code and scripting languages are covered. Long-tail languages stay in the manual review queue.
The Bottom Line
GitHub Agentic Autofix and AI Scan are now generally available. The flow is alert → Copilot draft → CodeQL re-run → draft PR → human review. The 25-alert batch mode is the operational feature. AI Credits from the Code Security budget is the pricing. The bottleneck on most security teams is now PR review, not alert triage, and the teams that get the most value will be the ones whose review process is fast. Enable it on a representative repo, measure the merge rate of Copilot-generated fixes, and roll out from there.
Sources
Get the next briefing
Signal first. Three signals, why they matter, and one action.
One concise briefing with three signals, why they matter, and one action to take.
New posts daily, briefing weekday mornings. We use your email only to send the briefing. Unsubscribe anytime. Privacy policy.
Share this article