AIWorld News

CodeMender: a new AI agent from Google DeepMind that finds and fixes code vulnerabilities automatically

  • CodeMender is an AI agent from Google DeepMind that automatically detects and fixes software vulnerabilities — without human intervention.
  • The system is both reactive and proactive: it repairs existing bugs and rewrites code to prevent entire categories of future security flaws.
  • Every patch undergoes rigorous automated validation, ensuring no new errors, regressions, or performance issues are introduced before human review.

CodeMender is a new AI agent from Google DeepMind that detects and repairs security vulnerabilities in source code automatically. The agent is not only reactive. It also works proactively by rewriting parts of code to reduce whole classes of security bugs. Every fix goes through strict automated validation to prevent new issues such as regressions or performance problems.

In six months, CodeMender contributed 72 security fixes to open-source projects.
This shows the system can scale fixes across real codebases while preserving quality control.

How CodeMender works

The system is built on advanced models in the Gemini Deep Think family. These models let the agent analyze code deeply, understand root causes, and propose precise fixes. When a problem is found, CodeMender generates a patch and runs a comprehensive validation pipeline that checks the fix:

  • resolves the root cause,

  • does not break existing functionality,

  • preserves code style and performance.

Only patches that pass these checks are forwarded for human review.

Multi-agent, multi-tool approach

CodeMender combines static and dynamic analysis with techniques like fuzzing and differential testing. It uses a multi-agent architecture where specialized agents handle tasks such as critique, regression checking, and fix optimization. This division of labor improves reliability and helps the system self-correct.

Real examples

In one case CodeMender fixed a heap buffer overflow. Although the final change was a few lines, the agent traced the real cause to incorrect memory handling during XML parsing in a different part of the code.
In another case it produced a nontrivial patch for an object-lifetime issue inside a custom code-generation system—an error class that is hard for humans to spot quickly.

Prevention, not only repair

CodeMender can proactively harden code. For example it applied -fbounds-safety annotations to portions of libwebp, forcing compiler-added bounds checks that reduce exploitability of buffer overflows. Measures like this could have mitigated historical vulnerabilities such as CVE-2023-4863.

Open-source and caution

DeepMind is proceeding carefully. Today every CodeMender patch is reviewed by researchers before submission to projects. The team plans to work with maintainers and developer communities to refine the agent and, eventually, make it broadly available so developers can protect their code before vulnerabilities are exploited.

العربية (Arabic) To read the article in Arabic, click here

نورهان فؤاد

Google Cloud Launches Gemini Enterprise: The New Front Door for AI in the Workplace

كاتبة محتوى متخصصة، تجمع بين السلاسة والأسلوب الصحفي، تساهم في صياغة مقالات ريادة الأعمال والشركات الناشئة بأسلوب جذّاب وسهل الفهم
Back to top button