Google Unveils CodeMender AI for Automated Code Security and Patching
Google has launched CodeMender, an AI agent designed to automatically detect, verify, and patch security vulnerabilities in code, aiming to counter the growing use of AI by attackers.

Google has introduced a preview of CodeMender, an advanced AI agent engineered to proactively identify security vulnerabilities within software code, validate their exploitability, and automatically generate patches for developer review. This initiative represents a significant step in leveraging artificial intelligence to bolster software security, directly addressing the escalating threat landscape where adversaries are increasingly employing AI to accelerate their attacks.
The company positions CodeMender as a crucial tool for defenders, enabling them to match the speed and efficiency of AI-driven offensive operations. "CodeMender can help you advance from passive scanning to automated code remediation, and reduce zero-day risk," Google stated, highlighting its potential to shrink the window of opportunity for zero-day exploits. The agent is accessible through Google's Gemini Enterprise Agent Platform, utilizing its generally available Gemini models, and also as a component of Google's AI Threat Defense platform. A specialized version, paired with Gemini 3.5 Flash Cyber, is currently available to a select group of government entities and trusted partners, with broader access planned for the future. Google also intends to integrate support for third-party frontier models later this year.
CodeMender's effectiveness is rooted in its continuous updates, drawing from the latest Google DeepMind research, including up-to-date agent skills, security tools, and system prompts. The agent operates within the secure-by-design Gemini Enterprise Agent Platform, benefiting from robust enterprise-grade governance and security guardrails. These include secure traffic routing through customer VPCs, data isolation and encryption, and a strict policy of zero retention for source code data, ensuring a secure development and remediation environment.
The operational workflow of CodeMender is structured into three distinct stages. Initially, it conducts an in-depth scan of code repositories, identifying a wide array of vulnerabilities that traditional static analysis tools often miss. This includes complex issues such as memory corruption, injection flaws, web security weaknesses, cryptographic vulnerabilities, and insecure data handling. The agent supports a broad spectrum of programming languages, including C/C++, Go, Java, Python, Ruby, Rust, and TypeScript, making it versatile for diverse development environments.
Following the initial scan, CodeMender proceeds to the second stage: confirming the validity and severity of identified flaws. Instead of relying solely on pattern matching, the AI agent constructs proof-of-concept exploits and executes them within a customer-controlled sandbox environment. This rigorous validation process is designed to significantly reduce the incidence of false positives, ensuring that developers focus their efforts on genuine security threats.
Once a vulnerability is confirmed as exploitable, CodeMender enters its third stage, where it automatically generates a code patch. To ensure the integrity and functionality of the fix, the generated patch is then reviewed by another AI model acting as a 'judge.' This secondary check is crucial for identifying potential regressions or unintended side effects that a patch might introduce into the application. The final output presented to the developer is a clear code diff, and no changes are committed to the repository without explicit manual approval, maintaining human oversight in the critical patching process.
When integrated with the AI Threat Defense platform, CodeMender collaborates with Wiz to correlate identified vulnerabilities with their deployment context. This integration facilitates the triggering of automated penetration testing, providing a more comprehensive security validation loop. Google envisions CodeMender as a pivotal component in achieving a continuous, self-healing software development lifecycle, a future where code is autonomously secured, validated, and patched before it ever reaches production environments, thereby drastically reducing the attack surface and associated risks.