This paper introduces SecRepoBench, a benchmark to evaluate code agents on secure code completion in real-world repositories. SecRepoBench has 318 code completion tasks in 27 C/C++ repositories, covering 15 CWEs. We evaluate 29 standalone LLMs and 15 code agents across 3 state-of-the-art agent frameworks using our benchmark. We find that state-of-the-art LLMs struggle with generating correct and secure code completions. However, code agents significantly outperform standalone LLMs. We show that SecRepoBench is more difficult than the prior state-of-the-art benchmark. Finally, our comprehensive analysis provides insights into potential directions for enhancing the ability of code agents to write correct and secure code in real-world repositories.


翻译:本文介绍SecRepoBench,这是一个用于评估代码智能体在真实世界代码库中安全代码补全能力的基准。SecRepoBench包含27个C/C++代码库中的318项代码补全任务,涵盖15种常见缺陷枚举(CWE)。我们使用该基准评估了29个独立大语言模型和15个基于三种前沿智能体框架构建的代码智能体。研究发现,当前最先进的大语言模型在生成正确且安全的代码补全方面仍面临困难,而代码智能体的表现显著优于独立大语言模型。我们证明SecRepoBench比现有前沿基准更具挑战性。最后,通过全面分析,本研究为提升代码智能体在真实世界代码库中编写正确且安全代码的能力提供了潜在改进方向的洞见。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
《人工智能安全标准体系(V1.0)》(征求意见稿)
专知会员服务
29+阅读 · 2025年3月23日
DeepSeek模型在中文语境下的安全性评估
专知会员服务
27+阅读 · 2025年2月21日
《深度学习代码智能》综述、基准和工具集
专知会员服务
57+阅读 · 2024年1月2日
《人工智能安全测评白皮书》,99页pdf
专知会员服务
379+阅读 · 2022年2月26日
【Facebook】人工智能基准(Benchmarking)测试再思考,55页ppt
专知会员服务
32+阅读 · 2020年12月20日
《人工智能安全测评白皮书》,99页pdf
专知
36+阅读 · 2022年2月26日
Xsser 一款自动检测XSS漏洞工具
黑白之道
14+阅读 · 2019年8月26日
人脸检测库:libfacedetection
Python程序员
15+阅读 · 2019年3月22日
从 Encoder 到 Decoder 实现 Seq2Seq 模型
AI研习社
10+阅读 · 2018年2月10日
推荐|caffe-orc主流ocr算法:CNN+BLSTM+CTC架构实现!
全球人工智能
19+阅读 · 2017年10月29日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
13+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月17日
VIP会员
最新内容
世界模型入门:从序贯决策到通用智能体
专知会员服务
4+阅读 · 10月24日
军事域更好使用人工智能的实用指南
专知会员服务
9+阅读 · 10月22日
《衡量语言模型中的作战规划能力》
专知会员服务
14+阅读 · 10月20日
Maven智能系统:帕兰提尔军事人工智能平台详解
专知会员服务
16+阅读 · 10月20日
《测试自动化框架在敏捷软件开发中的角色》
专知会员服务
8+阅读 · 10月20日
俄罗斯如何拦截乌克兰无人机与巡航导弹
专知会员服务
12+阅读 · 10月15日
《武器-目标分配问题:精确与近似求解算法》
专知会员服务
17+阅读 · 10月15日
相关VIP内容
《人工智能安全标准体系(V1.0)》(征求意见稿)
专知会员服务
29+阅读 · 2025年3月23日
DeepSeek模型在中文语境下的安全性评估
专知会员服务
27+阅读 · 2025年2月21日
《深度学习代码智能》综述、基准和工具集
专知会员服务
57+阅读 · 2024年1月2日
《人工智能安全测评白皮书》,99页pdf
专知会员服务
379+阅读 · 2022年2月26日
【Facebook】人工智能基准(Benchmarking)测试再思考,55页ppt
专知会员服务
32+阅读 · 2020年12月20日
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
13+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员