CodeMender overview

The launch of advanced AI models has triggered widespread concern regarding code vulnerabilities. As attackers gain access to new capabilities for generating exploits, security teams are under immense time pressure to proactively find and fix vulnerabilities before they can be exploited.

CodeMender is an AI code security agent that can find, verify, and fix deep vulnerabilities in your codebase. CodeMender wraps a fine-tuned harness around an LLM, using Google DeepMind-engineered prompts, skills, and orchestration logic to turn the model into an agentic system specialized in code security.

How it works

CodeMender is designed to handle the scale and diversity of modern corporate environments, where code spans numerous languages and system types:

During all three stages, you can provide context to CodeMender to ensure it accounts for the nuances of your application and threat model. This combination of an LLM with CodeMender's fine-tuned harness provides higher-quality results versus using an LLM alone to find and fix vulnerabilities.

System architecture

From a user perspective, the CodeMender system consists of two components:

Supported languages and frameworks

CodeMender supports top vulnerability types across all major programming languages: C/C++, Go, Java, Python, TypeScript / JavaScript, Rust, and Ruby. Additionally, it has broad support for standard libraries within these languages, as well as common enterprise frameworks (such as HTML/CSS, Django, Flask, React, Spring Boot, and Express).

Supported vulnerability types cover a wide spectrum of software security flaws across application logic, data handling, memory management, and authentication control flows.

Supported models

CodeMender supports the following models:

Click to expand supported models

To specify a model when running CodeMender CLI commands, see Specifying the model.

Track token usage

CodeMender surfaces token consumption in two places: a live status line while a command runs, and a one-line summary when a command completes successfully. Counts cover input, output, and total tokens for the current session.

Live status line

While cm find, cm fix, cm verify, or cm session resume is running, pass the --compact flag to display a rolling status line that updates as the agent works:

cm find ./src/auth/ --compact

The status line reports cumulative session totals:

Tokens: 40k in / 12k out / 60k total

Resumed sessions continue counting from where the prior run left off. The total count may include the model's internal reasoning tokens, so it can exceed in + out.

Exit summary

When a command finishes successfully and at least one tool step was executed, CodeMender prints a one-line summary with elapsed time and token totals:

 Completed 14 tool steps in 3m 42s | Tokens: 40k in / 12k out / 60k total

Billed token usage

To view cumulative billed token usage and cost trends across your Google Cloud project, see View your billing reports and cost trends in Cloud Billing.

Security and data privacy

The following sections outline CodeMender's security model, data retention policies, and access controls:

What data is sent to the cloud?

When using CodeMender, the local CLI tool mediates access to your code, ensuring that your full source code repositories are never uploaded to Google's servers and are not independently cloned by the hosted agent.

Instead, the data sent to the Google-hosted agent is strictly localized and consists of:

Your customer source code is never used to train the underlying model weights.

What is the retention policy?

CodeMender uses a strict, short-term data retention policy:

Who can access the data?

CodeMender is designed with a "Zero-Data-Access" approach regarding human visibility:

Get started with the CLI

Set up the CLI tool and initialize your workspace to start scanning.

Prerequisites

Before you initialize the CodeMender CLI, ensure your environment is prepared correctly:

Specifying the model

By default, CodeMender uses Gemini 3.5 Flash. To override the default model, pass the --model flag with the corresponding model identifier:

The --model flag is supported by the following commands:

To specify a model when running any of these commands, use the following syntax:

cm COMMAND TARGET --model MODEL_NAME

What's next

For detailed instructions, see the following guides:

  • Install CLI and configure credentials
  • Scan and verify code vulnerabilities
  • Import third-party security findings
  • Fix code vulnerabilities and manage diffs
  • Manage sessions and export reports