arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.07595cs.CRcs.AIcs.SE
收藏

VulDetectBench:评估大型语言模型在漏洞检测中的深层能力

VulDetectBench: Evaluating the Deep Capability of Vulnerability Detection with Large Language Models

Institute of BigData, Fudan University(复旦大学大数据研究院);School of Computer Science, Fudan University(复旦大学计算机科学学院);School of Computer Science, Huazhong University of Science and Technology(华中科技大学计算机科学学院);Purple Mountain Laboratories(紫金山实验室);School of Software Engineering, Huazhong University of Science and Technology(华中科技大学软件学院)

Yu Liu, Lang Gao, Mingxin Yang, Yu Xie, Ping Chen, Xiaojin Zhang, Wei Chen

AI总结:

本文提出VulDetectBench基准,通过五个递增难度任务评估17个LLM在漏洞识别、分类与定位上的能力,发现现有模型在精细分析任务上准确率不足30%,为漏洞检测研究提供基础。

摘要:

大型语言模型(LLMs)的训练语料包含大量程序代码,极大地提升了模型的代码理解与生成能力。然而,针对代码相关的更具体任务——程序漏洞检测,以及评估LLMs在此更专业场景中的表现,仍缺乏全面深入的研究。为解决漏洞分析中的常见挑战,我们的研究引入了一个新基准VulDetectBench,专门设计用于评估LLMs的漏洞检测能力。该基准通过五个难度递增的任务,全面评估LLM在识别、分类和定位漏洞方面的能力。我们评估了17个模型(包括开源和闭源)的性能,发现尽管现有模型在漏洞识别和分类相关任务上能达到超过80%的准确率,但在更具体、更详细的漏洞分析任务上仍表现不足,准确率低于30%,难以对专业漏洞挖掘提供有价值的辅助信息。我们的基准有效评估了各LLM在漏洞检测这一特定任务中不同层级的能力,为未来在这一代码安全关键领域的研究和改进奠定了基础。VulDetectBench已公开于https://github.com/Sweetaroo/VulDetectBench。

英文摘要:

Large Language Models (LLMs) have training corpora containing large amounts of program code, greatly improving the model's code comprehension and generation capabilities. However, sound comprehensive research on detecting program vulnerabilities, a more specific task related to code, and evaluating the performance of LLMs in this more specialized scenario is still lacking. To address common challenges in vulnerability analysis, our study introduces a new benchmark, VulDetectBench, specifically designed to assess the vulnerability detection capabilities of LLMs. The benchmark comprehensively evaluates LLM's ability to identify, classify, and locate vulnerabilities through five tasks of increasing difficulty. We evaluate the performance of 17 models (both open- and closed-source) and find that while existing models can achieve over 80% accuracy on tasks related to vulnerability identification and classification, they still fall short on specific, more detailed vulnerability analysis tasks, with less than 30% accuracy, making it difficult to provide valuable auxiliary information for professional vulnerability mining. Our benchmark effectively evaluates the capabilities of various LLMs at different levels in the specific task of vulnerability detection, providing a foundation for future research and improvements in this critical area of code security. VulDetectBench is publicly available at https://github.com/Sweetaroo/VulDetectBench.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑