Skip to content

UK let AI hunt bugs in government code — it found 1,352 for £13,000

Category
News
Published
Reading time
4 min

The UK government ran AI models through 548 code repositories across 18 departments and uncovered over a thousand flaws — from auth bypass to remote code execution. The scan cost just £13,000.

While plenty of people are still arguing whether AI can be trusted with anything serious, the UK government just handed it the keys to its own codebase — and came away pleased with the results. In two pilot programs, AI models scanned 548 code repositories across 18 government departments and turned up 1,352 vulnerabilities, including authentication bypasses, data exposure, and remote code execution flaws.

One of the more telling finds: a legacy GitHub Actions workflow where an outside user could smuggle in malicious code through a specially crafted pull-request comment. It's the kind of flaw that's easy to miss in a manual audit but trivial for a model trained to spot exactly that pattern.

The real headline, though, is the price tag. A month-long run across nine government organizations cost just £13,000 in AI tokens. A traditional penetration test of comparable scope typically runs into the tens or hundreds of thousands of pounds and takes weeks. Teams used different setups — one strung together a six-stage AI agent chain (triage, validator, auditor, tracer, judge, summary), another layered three model passes on top of standard scanners like Gitleaks, Trivy, and Semgrep.

AI Minister Kanishka Narayan announced the program's expansion in a speech at Imperial College London. Every critical flaw was fixed, and no evidence of exploitation turned up anywhere. The Government Cyber Unit, the National Cyber Security Centre and the AI Security Institute now plan to extend the approach to closed-source code and more departments.

There's a second, less comfortable thread running through the announcement: Britain is starting to draft protocols for what happens if autonomous AI agents slip out of human oversight. The language is still cautious — "loss-of-control risk," "incident response protocols" — but the fact that a government just trusted AI to hunt bugs in its own systems while simultaneously planning how to rein AI in if it goes rogue says a lot about how high the stakes already feel.

Questions and answers

Frequently asked questions about this article

1,352 vulnerabilities across 548 code repositories from 18 departments — including authentication bypasses, data exposure, and remote code execution flaws. All critical issues were fixed.