
GitHub put agentic autofix for code scanning alerts into public preview on July 10, 2026. When a team assigns a security alert to Copilot, the agent explores related code across the repository, proposes a fix, reruns CodeQL to validate it, and opens a draft pull request for human review.
The flow is different from a traditional Generate Fix action. GitHub describes the agent as working across the codebase the way a developer would: understand the relevant code path, generate a remediation, then check whether the change actually closes the original alert. If validation does not pass, the agent can iterate until it produces a change that is ready to review.
GitHub says fix generation typically takes two to four minutes. The resulting pull request includes a summary of the fix, why it closes the alert, and the validation steps Copilot used. Developers can continue the session by commenting on the pull request or interacting with it from the repository's Agents tab.
Teams can trigger the flow from an individual code scanning alert, select multiple alerts from the repository security alerts list, or choose alerts inside a security campaign. GitHub also exposes a REST API path by setting "assignees" to "copilot-swe-agent[bot]", allowing the remediation workflow to connect to existing security operations tooling.
The preview has specific access requirements. An organization needs a GitHub Code Security or GitHub Advanced Security license, plus a Copilot license with Copilot cloud agent enabled. Agentic autofix consumes organization AI Credits, and its activity also consumes GitHub Actions minutes. Organization and enterprise administrators can disable the feature through policy.
For security teams, the most important design choice is that the agent creates a draft pull request instead of merging directly. That preserves human approval, testing, and scope review, while giving teams a way to trial the agent on repetitive, lower-risk remediation work. The evaluation should cover more than speed: false fixes, regression risk, AI Credit cost, and permission boundaries matter just as much.
The broader signal is that coding agents are beginning to form a loop from discovery to understanding, remediation, validation, and review. CodeQL detects the issue, Copilot proposes a cross-file change, and a human approves the result. That turns a one-off manual task into a governed workflow. It will not fit every vulnerability, but teams with large volumes of repeated alerts may find it worth testing under clear guardrails.



