CWE-bench:将智能体安全研究从漏洞利用重新聚焦到防御
CWE-bench: Refocusing Agentic Security from Exploitation to Defense
AI总结:
该研究推出CWE-bench基准,针对智能体防御能力设计含多维度漏洞审计修复任务,验证其防御表现,发现智能体防御性能受漏洞类别影响更大,为评估智能体防御能力提供了严格标准。
摘要:
AI智能体的网络安全评估大多聚焦于攻击,但成功的漏洞利用并不能证明智能体能保障软件安全。攻击者只需利用一个漏洞,而防御者必须发现并修复所有漏洞。我们推出CWE-bench,这是一个包含120个保留的代码库审计与修复任务的私有基准,涵盖73种CWE类型、8种语言以及所有OWASP Top 10 2025类别。智能体需对代码库进行审计并获取其威胁模型描述,但不会被告知漏洞、漏洞位置或漏洞数量。每个补丁必须在保留原始功能的同时阻止漏洞利用,这由程序验证器检查。我们针对一组智能体验证器对该验证器进行了验证,在开发过程中手动审查分歧并完善检查规则。最佳智能体达到68%的pass@1和81%的pass@4。我们进一步分析发现:(i)相同pass@1的智能体在重试增益和成本上差异显著;(ii)没有单一智能体在所有语言或漏洞类别中表现最佳,且漏洞类别带来的难度差异远大于语言带来的差异。随着智能体攻击能力的提升,CWE-bench提供了广泛且严格的衡量标准,以评估其防御能力是否同步提升。
英文摘要:
Cybersecurity evaluations of AI agents have focused largely on offense, yet a working exploit does not show that an agent can make software safe. An attacker needs to exploit only one vulnerability; a defender must find and fix all of them. We introduce CWE-bench, a benchmark of 250 repository audit-and-repair tasks spanning 185 CWE types and eight languages, grouped into ten weakness classes. We release 100 tasks publicly and keep 150 held out. Agents are given a repository to audit and a description of its threat model, but are not told the weakness, where it occurs, or how many vulnerable sites there are. Each patch must block the exploit while preserving original functionality, as checked by a deterministic programmatic verifier. Verifiers were curated with panels of agentic judges and reviewed by hand, so that they reject incomplete repairs without penalizing correct ones. The best agent reaches 67% pass@1 and 79% pass@4. We further conduct analyses showing that (i) agents with similar pass@1 differ widely in retry gains and cost, and (ii) no single agent is best across languages or weakness classes. As the offensive capabilities of agents improve, CWE-bench provides a broad and rigorous measure of whether their defensive capabilities keep pace.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。