UK uses frontier AI to find 1,352 security flaws in its own government code
The UK government turned AI agents loose on its own code, finding 1,352 vulnerabilities across 18 departments for just £13,000.
Tools · Source: Unite.AI
What happened
The UK government ran two pilot programs using frontier AI models to scan its own public code repositories. They unleashed these models across 18 government departments to see what they could break. The result was a massive haul of 1,352 identified and addressed cybersecurity vulnerabilities across 548 repositories. This proves that advanced AI can practically apply to government cybersecurity at scale.
A specific month-long hackathon by the Government Cyber Coordination Centre provides the blueprint. Teams did not use a single mandated approach. They built their own tooling, using six-stage AI agent chains and layering models over conventional scanners like Gitleaks and Semgrep. They found 407 findings in this exercise alone. The flaws were severe, including authentication bypass, data exposure, and remote code execution. The total cost for the AI model usage was a mere £13,000.
Now, the UK is extending this AI-assisted vulnerability detection program to protect critical public services. But they are also preparing for the flip side. British authorities are working with the AI Security Institute to develop incident response frameworks for when autonomous AI agents go rogue. They are exploring updates to the Cyber Security and Resilience Bill to handle AI loss-of-control risks, ensuring essential services are protected from autonomous systems that evade human oversight.
Key facts
- 1,352 — Total vulnerabilities identified and addressed across two pilots
- 548 — Number of government code repositories scanned
- 18 — Number of government departments involved in the pilots
- £13,000 — Cost of AI model usage for the month-long case study
- 407 — Findings from the specific one-month hackathon exercise
Why it matters
Security testing just got completely commoditized. If a government agency can wire together AI agents to audit hundreds of repositories for the price of a used car, every startup can afford enterprise-grade code auditing. You no longer have an excuse for shipping basic vulnerabilities. The barrier to entry for finding critical flaws like remote code execution has dropped to near zero.
The attack surface is fundamentally changing. The UK is actively preparing for autonomous AI agents causing security incidents. As AI systems gain permissions to execute tasks and access connected systems, the next wave of cyber threats will not just be human hackers. It will be rogue or hijacked agents operating at machine speed. Builders must now design systems that can defend against autonomous agents that act outside their intended instructions.
For builders
Build AI security agent chains
The UK teams built custom agent chains with triage, validator, auditor, tracer, judge, and summary stages. There is a massive market for selling pre-packaged AI security pipelines to enterprises. Companies will pay a premium for tools that automate this multi-step verification process.
Layer AI over existing scanners
One successful approach layered AI models on top of conventional tools like Gitleaks, Trivy, and Semgrep. Do not replace your current security stack. Use AI to investigate attack chains and triage the output of your existing scanners to eliminate false positives.
Prepare for agent-based liability
The UK is updating laws to handle AI loss-of-control risks. If you build autonomous agents, you must implement hard limits on their permissions. You will face severe liability if your agent mishandles confidential data or executes unauthorized code on connected systems.
My take
Finding 1,352 bugs for £13,000 is an absolutely insane return on investment. I am amazed the government moved this fast to build custom agent chains instead of waiting years for a bloated enterprise vendor. If you are a founder and you are not using AI to audit your codebase right now, you are practically begging to be hacked.
Original reporting: Unite.AI. This is my rewrite and opinion.