Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Get suggested fixes for CodeQL alerts on pull requests with Copilot Autofix

When CodeQL code scanning finds a vulnerability, Copilot Autofix proposes a code change with an explanation on the pull request or alert page, for a developer to review, edit and accept.

Upvote 0. Sign in to upvoteSign in to upvote · One vote per signed-in person. Site votes are separate from GitHub stars.

The problem

How it works

GitHub’s application card for its security AI features explains how Autofix works. For each CodeQL alert it sends the alert data, short snippets around the source, sink and flow locations, the first lines of each file involved and the query’s help text to a language model. The model writes a fix and an explanation, which appear as a suggestion on the pull request or on the alert. It covers a subset of CodeQL queries in C#, C and C++, Go, Java and Kotlin, Swift, JavaScript and TypeScript, Python, Ruby and Rust, works on existing alerts on the default branch too, is on by default wherever CodeQL runs, and does not need a Copilot subscription.

Results and limitations

GitHub says it tests Autofix on more than 2,300 alerts from public repositories by merging suggestions unedited and rerunning code scanning and tests, and that many could be committed as-is. It gives no overall rate, so the case is marked planned.

Before you try it

GitHub lists the failure modes plainly: suggestions can be wrong, in the wrong place, change behaviour, only partly fix the issue, or add new vulnerabilities, and they can add dependencies with made-up names. Keep CI tests and dependency review on pull requests, and review every suggestion as you would a colleague’s. Complex multi-file data flows and very large files are less likely to get a fix. Results depend on your setup and were not independently reproduced by Top 200 Repos.

Tools and repositories

No ranked repository is involved. This use case still stands on its own source.

Tools
GitHub code scanning with CodeQL · Copilot Autofix
Prerequisites
A GitHub repository with CodeQL code scanning enabled.

Try it yourself: Review an Autofix suggestion before accepting it

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
Here is a CodeQL alert and the fix Copilot Autofix suggested: [Alert and suggested fix]. The code is [Language] and its intended behaviour is [Intended behaviour]. Check whether the fix removes the vulnerability on every path, whether it changes behaviour for valid input, and whether it adds or changes any dependency. Suggest tests that would prove the fix, and say whether you would accept, edit or reject it.

Run the suggested tests in CI before merging.

Sources

  1. Application card: GitHub security and quality AI features (opens in a new tab)

    Project documentation · docs.github.com · Undated · Source checked 12 Nov 2026, 18:03 UTC

    What this source supports
    • Copilot Autofix generates fix suggestions with explanations for CodeQL alerts on pull requests and the default branch, and does not require a Copilot subscription
    • Inputs are SARIF alert data, snippets around the flagged locations, the first lines of involved files and the query help text
    • Supported languages: C#, C/C++, Go, Java/Kotlin, Swift, JavaScript/TypeScript, Python, Ruby and Rust, for a subset of queries
    • Limitations include syntax, location and semantic errors, partial or misleading fixes, and fabricated dependencies; human review is required
    • An internal harness of over 2,300 alerts tests unedited suggestions against code scanning and the repositories’ tests
Report a problem

Reported by source

Check every pull request for security flaws with Claude Code’s security review action

Anthropic’s security review GitHub Action has Claude Code read each pull request diff, filter likely false positives and comment on risky lines; the same checks run locally with /security-review.

claude.com · 6 Aug 2025anthropics/claude-code
Reported by source

Patch the root cause of security bugs with a validating agent, as Google’s CodeMender does

Google DeepMind’s CodeMender uses Gemini models with a debugger, static and dynamic analysis and an LLM critic to patch vulnerabilities; Google says it upstreamed 72 security fixes in six months.

deepmind.google · 6 Oct 2025
Reported by source

Review pull requests automatically with Claude in GitHub Actions

Install the Claude Code GitHub Action so Claude reviews each pull request with inline comments and responds to @claude requests.

code.claude.comanthropics/claude-code
Reported by source

Audit kernel code for use-after-free bugs with a reasoning model

Sean Heelan benchmarked OpenAI o3 on a known ksmbd bug, then ran it across the SMB handlers, where it surfaced a new Linux kernel vulnerability, CVE-2025-37899.

sean.heelan.io · 22 May 2025
Reported by source

Hunt for variants of fixed bugs with an LLM agent, as Google's Big Sleep did in SQLite

Google's Big Sleep agent started from recent SQLite fixes, looked for related unfixed bugs and found an exploitable stack buffer underflow before it reached an official release.

projectzero.google · 1 Nov 2024
Planned, not done

Let an agent decompile and annotate a binary in Ghidra through GhidraMCP

GhidraMCP exposes Ghidra's decompiler and renaming tools over MCP, so an agent such as Claude Code can list functions, read decompiled code and propose clearer names.

github.comNationalSecurityAgency/ghidra