# CodeMender

> Google Cloud's autonomous AI security agent that finds, verifies with proof-of-concept exploits, and patches code vulnerabilities.

CodeMender is an autonomous code security agent from Google Cloud, originally developed by Google DeepMind and hosted on the Gemini platform. It scans codebases for vulnerabilities, verifies exploitability, and generates patches that developers review and approve.

## What It Is

CodeMender is a managed, headless security agent paired with a lightweight local CLI. It uses a fine-tuned security harness and a selection of models to analyze root causes, run exploit simulations, and propose code fixes. Core reasoning and orchestration run in the cloud, while builds, test execution, and exploit simulations run in customer-managed sandboxes or isolated VMs.

## Scan, Verify, Remediate Workflow

The scan phase traces control flows and data paths across multi-language codebases to find flaws such as memory corruption and injection attacks. In the verify phase, the agent builds the code and runs a proof-of-concept exploit to confirm a vulnerability is exploitable, which Google says reduces false positives and alert fatigue. In the remediate phase it generates a code diff or pull request addressing the root cause, and uses an LLM-as-a-judge framework to check that the patch keeps existing behavior intact.

## Developer Control and Data Handling

Patches are delivered as local diffs and are applied only after a developer reviews and approves them, via the CLI or tools such as VS Code. Google states that source repositories are not uploaded, that session data is retained encrypted for up to seven days, and that customer code is not used to train its models. VPC Service Controls and private traffic routing are available as platform guardrails.

## Where It Fits

CodeMender is described as a core component of Google AI Threat Defense, alongside Gemini, Wiz, and Mandiant. It can ingest findings from Wiz, and the binary can be packaged in a custom container for CI/CD pipelines. Documented language support includes C/C++, Java, Python, TypeScript/JavaScript, Go, Rust, and Ruby.

## Features
- Deep vulnerability scanning across multi-language codebases
- Execution-based verification with proof-of-concept exploits
- Automated patch generation as code diffs and pull requests
- LLM-as-a-judge patch validation for program equivalence
- Multi-model support to optimize cost, speed, or depth
- Human-in-the-loop review and approval of patches
- Local CLI and VS Code interaction
- Source code stays in customer environment
- CI/CD integration via packaged container
- VPC Service Controls support

## Integrations
Wiz, Gemini platform, VS Code, Google AI Threat Defense, Mandiant

## Platforms
WINDOWS, WEB, API, VSC_EXTENSION, CLI

## Pricing
Paid

## Links
- Website: https://cloud.google.com/security/codemender
- Documentation: https://docs.cloud.google.com/gemini-enterprise-agent-platform/codemender
- EveryDev.ai: https://www.everydev.ai/tools/codemender
