AutofixDuel scores autofixers on 9 seeded CodeQL alerts. No live fixer was scored yet.
Our harness re-scans every autofix with CodeQL and reruns the original tests. All 9 seeded alerts fired, and a regex baseline fixed 5 of 9. The live arms were not run.
By David Discua
Measured in the lab
- 9/9
- seeded alerts that fire
- 5/9
- baseline fixed
- 8/9
- baseline exploit blocked
- 0
- live fixers scored
- All 9 seeded CodeQL rules fire before any fix
- Test files restored before scoring, so a fixer cannot edit them away
- Baseline closed c07-codeinj and broke 2 of 3 tests
- Mock arms use synthetic tokens at a fictional rate
- Mantis and Copilot arms not run in this lab
From reports/bakeoff.json · run on October 21, 2026. CodeQL 2.27.2, python-code-scanning.qls; baseline arm plus two mock arms with synthetic tokens at a fictional rate; live arms not run
How it is wired
01/03Nine tiny Flask apps each carry one seeded bug that CodeQL flags.
AutofixDuel is our harness for comparing code-scanning autofixers on the same alerts. It seeds nine small Flask apps with one CodeQL alert each, lets every fixer patch them, then re-scans with CodeQL and reruns the original tests. A case counts as fixed only when the alert is closed, the tests pass and no new alert shows up. In the keyless run all nine seeded alerts fired and our regex baseline fixed 5 of 9. The catch is that no live fixer was scored, so this post cannot tell you whether GitHub's agentic autofix or Google's Mantis does better.
The catch
The two arms that matter are built and tested against fake transports, and the live path was not run in this lab. The Mantis arm drives a google/mantis checkout pinned at commit 674f331 and reads the patch from the run's knowledge DB. The Copilot arm assigns a code scanning alert to copilot-swe-agent[bot] over the REST API, waits for the draft PR, and scores its diff like any other arm. The README notes that the link between that draft PR and the alert is inferred, since GitHub's docs do not say how the PR references it.
The other two arms, mock-a and mock-b, replay hand-written patches with synthetic token counts priced at a fictional rate. They are not any real model. They exist so every scorer outcome appears in a keyless run, and they did separate cleanly (7 of 9 fixed against 2 of 9).
CodeQL closure and safety also differ. Our baseline blocked the exploit test in 8 of 9 cases but closed the CodeQL alert in only 7. On c07-codeinj it swapped eval for ast.literal_eval, which closed the alert and broke 2 of the 3 original tests. On c06-redirect the alert stayed open with every test green.
What we ran (keyless)
uv sync --frozen
bash scripts/install_codeql.sh
uv run autofixduel cases
uv run autofixduel scan
uv run autofixduel run --out out
Baseline arm, from reports/bakeoff.json, run on October 21, 2026 with CodeQL 2.27.2 and the python-code-scanning.qls suite:
| Baseline result | Value |
|---|---|
| Patched | 8/9 |
| Alert closed after re-scan | 7/9 |
| Original tests green | 6/9 |
| Exploit test blocked | 8/9 |
| New alerts | 0 |
| Fixed | 5/9 |
| Median diff | 3 lines |
The nine seeded rules run from py/sql-injection (CWE-89) to py/full-ssrf (CWE-918), and each one fired on its case before any fix. The baseline returned no patch for c09-ssrf. On c05-deser it moved pickle to JSON, which closed the alert and broke the test that pins the pickle wire format. That case is hard on purpose.
How it is wired
Each case is a tiny Flask repo with a seeded app.py, functional tests and one exploit test that fails before any fix. CodeQL records the target alert per case. Every arm patches a copy, then the scorer restores the original test files, re-scans the patched tree, runs pytest and computes its own unified diff. Cost per fix comes from dated price rows in config/prices.json. Since Mantis reports tokens without an input and output split, its cost would be a range.
Minilab (open source)
AutofixDuel is our own lab, Apache-2.0 and written in Python, at SkilledDragonCorp/autofixduel. The live arm targets google/mantis (2,519 stars, Apache-2.0, Python, as of October 24, 2026). The CodeQL CLI is free for open-source code and research, not for closed-source CI, and the install script downloads it with a pinned SHA-256. Run uv run autofixduel run --out out and compare out/bakeoff.md with reports/bakeoff.md. To score a live fixer, follow the Mantis setup in the README in an isolated VM, or push autofixduel export-repo output to a throwaway repo you own.
Run it yourself
SkilledDragonCorp/autofixduel
Clone, install and run the report with no API keys. The numbers above are what that run writes.
uv sync --frozen && bash scripts/install_codeql.sh && uv run autofixduel run --out outSkilledDragon is not affiliated with GitHub, Microsoft, Google or the Mantis project. GitHub, CodeQL and Copilot are trademarks of GitHub, Inc. Numbers are from our own keyless lab run; re-run the report before relying on them.
All labs