MarkTechPost@AI 10月07日 15:22
CodeMender:AI自动修复软件漏洞
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

Google DeepMind推出CodeMender,一个利用Gemini“Deep Think”推理能力和工具辅助工作流的AI代理,能够自动定位漏洞根源,通过分析和测试验证修复方案,并主动重写相关代码以消除整个漏洞类别,最终向上游提交补丁。在内部部署的六个月内,CodeMender为包括高达450万行代码的开源项目贡献了72个安全补丁,既能被动修复已知问题,也能主动消除漏洞类别。该系统结合了大规模代码推理与程序分析工具,并设计了多智能体协作,确保补丁在提交人工审核前经过严格的自动化验证。

🤖 **AI驱动的漏洞修复自动化:** CodeMender是一个创新的AI代理,它能够自动化软件漏洞的整个修复流程。通过结合Gemini的“Deep Think”推理能力和一系列程序分析工具(如静态/动态分析、差分测试、模糊测试和SMT求解器),CodeMender可以精确地定位漏洞的根本原因,生成并验证潜在的修复方案,甚至主动重写代码以消除整个漏洞类别,从而极大地提升了软件安全性和开发效率。

🛠️ **多阶段验证与人工审核:** 该系统强调在补丁提交给人类维护者之前进行全面的自动化验证。CodeMender的验证流程包括测试补丁是否解决了根本原因、功能是否正确、是否引入了回归问题以及是否符合代码风格。只有经过严格自动化测试并获得高置信度的补丁才会被提议进行人工审查,确保了修复的质量和可靠性。

🛡️ **主动安全加固:** 除了被动修复已知漏洞,CodeMender还具备主动安全加固能力。它能够在大规模代码库中应用安全加固转换,例如自动在libwebp中插入Clang的-fbounds-safety注解,强制执行编译器级别的边界检查。这种方法能够有效抵御潜在的内存安全漏洞,如缓冲区溢出,从而从源头上提升代码的安全性。

🚀 **广泛的应用与贡献:** 在短短六个月的内部部署中,CodeMender已成功为包括大型开源项目在内的多个项目贡献了72个安全补丁,其处理的代码库规模高达约450万行。这表明CodeMender在处理复杂和大规模代码项目方面具有强大的能力和潜力,为开源社区的安全做出了显著贡献。

What if an AI agent could localize a root cause, prove a candidate fix via automated analysis and testing, and proactively rewrite related code to eliminate the entire vulnerability class—then open an upstream patch for review? Google DeepMind introduces CodeMender, an AI agent that generates, validates, and upstreams fixes for real-world vulnerabilities using Gemini “Deep Think” reasoning and a tool-augmented workflow. In six months of internal deployment, CodeMender contributed 72 security patches across open-source projects, including codebases up to ~4.5M lines, and is designed to act both reactively (patching known issues) and proactively (rewriting code to remove vulnerability classes).

Understanding the Architecture

The agent couples large-scale code reasoning with program-analysis tooling: static and dynamic analysis, differential testing, fuzzing, and satisfiability-modulo-theory (SMT) solvers. A multi-agent design adds specialized “critique” reviewers that inspect semantic diffs and trigger self-corrections when regressions are detected. These components let the system localize root causes, synthesize candidate patches, and automatically regression-test changes before surfacing them for human review.

https://deepmind.google/discover/blog/introducing-codemender-an-ai-agent-for-code-security/?

Validation Pipeline and Human Gate

DeepMind emphasizes automatic validation before any human touches a patch: the system tests for root-cause fixes, functional correctness, absence of regressions, and style compliance; only high-confidence patches are proposed for maintainer review. This workflow is explicitly tied to Gemini Deep Think’s planning-centric reasoning over debugger traces, code search results, and test outcomes.

Proactive Hardening: Compiler-Level Guards

Beyond patching, CodeMender applies security-hardening transforms at scale. Example: automated insertion of Clang’s -fbounds-safety annotations in libwebp to enforce compiler-level bounds checks—an approach that would have neutralized the 2023 libwebp heap overflow (CVE-2023-4863) exploited in a zero-click iOS chain and similar buffer over/underflows where annotations are applied.

Case Studies

DeepMind details two non-trivial fixes: (1) a crash initially flagged as a heap overflow traced to incorrect XML stack management; and (2) a lifetime bug requiring edits to a custom C-code generator. In both cases, agent-generated patches passed automated analysis and an LLM-judge check for functional equivalence before proposal.

https://deepmind.google/discover/blog/introducing-codemender-an-ai-agent-for-code-security/?

Google’s broader announcement frames CodeMender as part of a defensive stack that includes a new AI Vulnerability Reward Program (consolidating AI-related bounties) and the Secure AI Framework 2.0 for agent security. The post reiterates the motivation: as AI-powered vulnerability discovery scales (e.g., via BigSleep and OSS-Fuzz), automated remediation must scale in tandem.

Our Comments

CodeMender operationalizes Gemini Deep Think plus program-analysis tools (static/dynamic analysis, fuzzing, SMT) to localize root causes and propose patches that pass automated validation before human review. Reported early data: 72 upstreamed security fixes across open-source projects over six months, including codebases on the order of ~4.5M lines. The system also applies proactive hardening (e.g., compiler-enforced bounds via Clang -fbounds-safety) to reduce memory-safety bug classes rather than only patching instances. No latency or throughput benchmarks are published yet, so impact is best measured by validated fixes and scope of hardened code.


Check out the TECHNICAL DETAILS. Feel free to check out our GitHub Page for Tutorials, Codes and Notebooks. Also, feel free to follow us on Twitter and don’t forget to join our 100k+ ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.

The post Google DeepMind Introduces CodeMender: A New AI Agent that Uses Gemini Deep Think to Automatically Patch Critical Software Vulnerabilities appeared first on MarkTechPost.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

CodeMender AI 软件安全 漏洞修复 Gemini Code Security Vulnerability Patching AI Agent
相关文章