GitHub Agentic Autofix is now generally available, and it does something new: it fixes your code scanning alerts for you and hands back a draft pull request to review. It launched on October 15, 2026, alongside a second tool, AI Scan, that checks pull requests in languages CodeQL doesn’t cover.
Both are aimed at the same pain point. Security alerts pile up faster than anyone can fix them.
Here are the quick facts before we get into the details.
- Both features reached general availability on October 15, 2026, according to the GitHub changelog.
- Agentic Autofix needs GitHub Enterprise Cloud with Code Security or Advanced Security.
- One draft pull request can cover up to 25 alerts.
- Usage draws on Code Security AI Credits, not a per-seat Copilot license.
- AI Scan findings are advisory and can’t block a merge.
How GitHub Agentic Autofix fixes a security alert
The old “Generate Fix” button gave you a suggested patch. The new flow is closer to handing the ticket to a junior developer. You assign a code scanning alert to Copilot, and an agent goes to work.
It explores the files around the alert, proposes a fix, then reruns CodeQL to check that the alert actually closes. When it’s done, it opens a draft pull request with a summary, an explanation of why the fix works, and the validation steps it took.
You can also assign up to 25 alerts at once from the security alerts list or a security campaign. If you want changes, comment on the pull request or open the session in the repository’s Agents tab. There’s also a REST API route for teams that want to automate assignment.
What AI Scan adds for PHP, Bash and Terraform
CodeQL is strong, but it doesn’t cover every language or framework. AI Scan fills some of that gap by reading pull request changes in places like PHP, Shell/Bash, Terraform, Dockerfiles, JSP for Java, and Blazor for C#.
It runs automatically on pull requests once code scanning and the AI Scan setting are on. Its findings show up next to CodeQL results, tagged with an “AI” label, and can include a plain explanation plus a suggested fix.
The catch is that it’s advisory. Findings don’t fail the code scanning check, and rulesets can’t use them to block a merge. It also skips pull requests from forks and those created by Dependabot.
Autofix vs AI Scan at a glance
The two tools sound similar, but they work at different moments. One cleans up old alerts, the other watches new code.
| Feature | Agentic Autofix | AI Scan |
|---|---|---|
| What it does | Fixes existing code scanning alerts | Reviews new pull request changes |
| Where it works | Alerts on the default branch | Pull requests (not forks or Dependabot) |
| Who gets it | Enterprise Cloud with Code Security or Advanced Security | Public repos; private repos need Code Security or Advanced Security |
| Output | Draft pull request with a fix | Findings marked “AI”, sometimes with a suggested fix |
| Can block a merge? | Not applicable, you review the draft PR | No, findings are advisory |
| Billing | Code Security AI Credits plus Actions minutes | Code Security AI Credits |
Used together, AI Scan flags a problem in a new pull request, and Autofix helps clear the backlog of alerts already sitting on your default branch.
How to turn it on and what it costs
Setup is a three-step job, and the order matters. Someone with billing rights has to start it.
- Define a Copilot usage-based billing method at the enterprise level.
- Have an enterprise admin enable the “Agentic autofix” policy in Advanced Security policies.
- Have an organization owner, security manager, or repo admin switch it on in Code Security settings.
People who assign alerts don’t need their own Copilot license. The cost shows up under “AI usage” in enterprise billing, filed under Advanced Security, and each session also uses GitHub Actions minutes because it reruns CodeQL.
GitHub’s pages don’t publish a price per credit. You can set SKU-level budgets, so a cap on spending is possible from day one.
Limits to know before you rely on it
This isn’t an auto-merge button, and GitHub doesn’t pretend it is. Human review and your normal CI tests still apply.
Only alerts on the default branch can be assigned, so issues found only in a feature branch or open pull request are out. Validation is also best-effort. The agent can’t confirm fixes for custom CodeQL queries, the security-extended suite, or third-party SARIF uploads.
If you’ve followed the wave of AI security tools, this will feel familiar. We covered Anthropic’s free scanner for open-source maintainers, and Microsoft is pushing the same idea through Copilot Autopilot and Code.
Frequently Asked Questions
Is GitHub Agentic Autofix free?
No. It uses Code Security AI Credits from your budget plus GitHub Actions minutes. GitHub hasn’t listed a price per credit.
Do I need a Copilot license to use it?
Individual users who assign alerts don’t. Your enterprise does need a Copilot usage-based billing method defined.
Can AI Scan block a pull request from merging?
No. Its findings are advisory and don’t fail the code scanning check, so rulesets can’t enforce them.
Does Agentic Autofix work on personal or free repositories?
Autofix is limited to Enterprise Cloud customers with Code Security or Advanced Security. AI Scan is available on public repositories, and private ones need Code Security or Advanced Security.
Should your team switch it on?
If you already pay for Code Security and have a stubborn alert backlog, turn it on for one repo and set a credit budget first. Judge it by how many draft pull requests your reviewers actually merge. Skip it if your alerts are mostly custom queries, since the agent can’t fully check those.


Leave a Reply