The Alberta government deployed 50 custom Agentic AI tools to parse through millions of lines of legacy code to identify vulnerabilities in government systems and fix them.
The tools were developed by the Ministry of Technology and Innovation, which used Anthropic’s agentic AI model Claude Code alongside its frontier models Claude Opus and Claude Sonnet. The ministry tested the agents on 1,280 applications and 3,400 code repositories run by the local Alberta government.
The AI agents parsed through more than 466 million lines of code in 20 hours to identify security vulnerabilities, the Alberta government said, adding that the AI systems were designed to spot vulnerabilities in the underlying infrastructure, deployment processes, and gaps in technical documentation. In one ministry, AI agents identified 185 aging systems to be replaced by 16 modern applications the government will own outright.
To put that scale in context: Alberta estimated that modernising its technology stack the traditional way would cost roughly CAD 2 billion and take more than a century. Using AI agents, the government is targeting a 95 per cent reduction in both time and cost.
“The tools our team built are world-class, and we are sharing them openly because every government is stuck with the same aging systems we were. Alberta is not waiting to solve this problem. We are solving it, and we are showing others how,” Nate Glubish, Alberta’s Minister of Technology and Innovation, said.
Anthropic’s Role In Vulnerability Detection
Anthropic on Monday said the analysis was carried out by the AI agents in two stages. The initial step involved scanning each repository with rules to flag known patterns. In the second stage, the agents were then required to review each of the flagged items and cite them line by line for the developers to verify.
Anthropic said it will be working with the ministry to develop AI agents that can build new software and tools. “The goal is to reduce complexity, lower maintenance costs, and speed up modernization work that would otherwise take years to complete,” the company said.
This review process is important when considering AI’s role in vulnerability detection. Some security experts have cautioned against their rushed deployment as they are prone to hallucinations and a high rate of false positives. AI agents are also known to be susceptible to “agentjacking,” in which an attacker can hijack AI coding agents to run attacker-controlled code on a developer’s machine. The vulnerability stems from how AI agents and models implicitly trust the Model Context Protocol (MCP), an open-source standard for connecting AI applications to external systems.
“MCP integrations are the next frontier for software supply chain attacks,” researchers at security firm Tenet, who uncovered the attack tactic said. “It is crucial to begin evaluating which tools your AI agents connect to, whether those tools return untrusted data, and what controls exist to prevent injected data from triggering code execution. The era of indirect prompt injection via developer tools has arrived.”