The problem
How it works
Google DeepMind built CodeMender as a research agent that fixes vulnerabilities rather than only finding them. It uses Gemini Deep Think models with tools for code search, debugging, static and dynamic analysis, differential testing, fuzzing and SMT solvers. In one example the crash report pointed to a heap buffer overflow, but the agent traced the real cause to incorrect handling of XML elements during parsing. It also rewrites code proactively: Google applied it to add -fbounds-safety annotations to parts of the libwebp image library, so the compiler inserts bounds checks. Before surfacing a patch, it checks that the change fixes the root cause, passes tests, causes no regressions and follows the project’s style, using a critic agent to compare old and new code.
Results and limitations
Google reports 72 security fixes upstreamed to open-source projects over six months, some in codebases of about 4.5 million lines, and says all patches are reviewed by human researchers before submission. These are vendor claims. CodeMender was not publicly available when announced.
Before you try it
You cannot run CodeMender yourself; what you can borrow is the method: reproduce the crash, find the root cause, make the smallest fix, then prove it with tests, a sanitizer or fuzzing run, and a human review. Only test software you own or are authorised to test, and report problems in other people’s projects through their security policy. Results depend on your setup and were not independently reproduced by Top 200 Repos.
Tools and repositories
No ranked repository is involved. This use case still stands on its own source.
- Tools
- Gemini Deep Think models · Debugger · Static and dynamic analysis · Fuzzing · SMT solvers
- Prerequisites
- CodeMender itself was a research system without public access; the prompt works with any coding agent.
Try it yourself: Ask your coding agent for a root-cause security fix
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Here is a crash or vulnerability report for [Project]: [Crash or vulnerability report]. First reproduce it with [Command that reproduces it]. Then find the root cause, which may be in a different place from where it crashes, and explain it. Propose the smallest patch that fixes the cause, not just the symptom. Prove it: rerun the reproduction, run [Test command], and tell me if any behaviour changed. Do not touch unrelated code and do not open a pull request.Use this only on code you maintain or are authorised to work on, and have a security-minded reviewer check the patch.
Sources
- Introducing CodeMender: an AI agent for code security (opens in a new tab)
Vendor post · deepmind.google · Published 6 Oct 2025 · Source checked 12 Nov 2026, 09:56 UTC
What this source supports
- CodeMender upstreamed 72 security fixes to open-source projects in six months, including projects of up to 4.5 million lines
- It uses Gemini Deep Think models with a debugger, code search, static and dynamic analysis, differential testing, fuzzing and SMT solvers
- An LLM-based critique tool checks changes for regressions; patches are validated before human review
- Applied -fbounds-safety annotations to parts of libwebp
- All patches are reviewed by human researchers before being submitted upstream