Using AI Agents to Secure Google Infrastructure

Google‘s AI and Infrastructure team has rolled out an AI-native, agentic approach to security that embeds vulnerability scanning and patching directly into its software development lifecycle. Instead of relying on large, one-off security scans that are slow and lack context, the team now evaluates every code check-in in real time using AI agents, across every layer of the stack. With the scale of code deployed to Google‘s infrastructure—hundreds of millions of lines—this continuous pre-submit scanning prevents hundreds of vulnerabilities per month from ever reaching the codebase or production.

The solution has three main components. First, pervasive pre-submit agentic scanning integrates security into the tools developers already use, making it a routine process like rule checking or readability review. Because each individual code change requires far less context than a whole-repo scan, the scan’s effectiveness improves. For context, the team evolved Mantis, its open-source multi-agent review harness, to pair security agents with localized threat models. These threat models are not static documents; they use live codebase metadata and a dependence call graph across packages and libraries to refine context. Keeping threat models part of ongoing scanning encourages developers to continuously update threats and dependencies. This localization dramatically improves accuracy, bringing false-positive rates down to 3% in some cases.

The second component is a two-step validation process for low latency. A quick lightweight scan first validates findings against a specialized triage agent, which uses abstract syntax tree parsing, call-graph traversal, and pre-indexed domain safety rules to prove whether a vulnerable path is actually reachable by an attacker. The triage agent achieves over 92% precision and finishes in less than a minute. After submission, a nightly integration test scan serves as a second layer of defense, catching vulnerabilities introduced across multiple changes during off-peak cycles. The third component is an automated bug-fix agent that takes scan results and generated proofs—snippets demonstrating how the vulnerability is exercised—to construct precise fixes consistent with Google‘s coding standards. These fixes are submitted for human review as part of the original change request, shortening the time between detection and resolution.

The article closes with learnings for any organization wanting a similar AI-native security approach. Keep the harnesses, rules, and context for development, scanning, and triage agents separate to prevent bias. Pair lightweight AI scans with deterministic, structural validation to reduce latency and improve accuracy. Feed agents existing threat models; precise context reduces false positives, and up-to-date threat models raise the floor on a team’s security posture. Choose a good multi-agent harness—the choice of underlying model matters, but a harness can compensate for model variability. Automate fixes with human-in-the-loop review to cut time-to-resolution. The team emphasizes that Mantis is open source and available for others to use, and points to Google Cloud, Gemini Enterprise Agent Platform, and Gemini models running on Trillium and Ironwood TPUs as foundational components. The same agentic vulnerability scanning and remediation also defends Google Cloud customers as part of Google Cloud’s secure software development lifecycle effort.

Using AI agents to secure Google infrastructure

View Original