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

CommitShield:追踪版本控制系统中的漏洞引入与修复

CommitShield: Tracking Vulnerability Introduction and Fix in Version Control Systems

Zhaonan Wu, Yanjie Zhao, Chen Wei, Zirui Wan, Yue Liu, Haoyu Wang

AI总结:

本文提出 CommitShield,融合静态分析与 LLM 的代码及自然语言理解能力,利用提交描述和补丁上下文检测漏洞引入与修复,并在 CommitVulFix 等数据集上显著提升召回率和 F1 分数。

摘要:

版本控制系统通常用于管理开源软件,其中每次提交都可能引入新的漏洞或修复现有漏洞。研究人员已经开发了各种用于检测代码提交中漏洞的工具,但其性能受到多种因素限制,例如忽视描述性数据,以及在准确识别漏洞引入方面存在挑战。为克服这些限制,我们提出了 CommitShield,它将静态分析工具的代码分析能力与大型语言模型(LLM)的自然语言和代码理解能力相结合,通过生成精确描述并获取丰富的补丁上下文,提高漏洞引入和修复检测的准确性。我们使用新构建的漏洞修复数据集 CommitVulFix 以及经过清洗的漏洞引入数据集评估 CommitShield。实验结果表明,在漏洞修复检测任务中,CommitShield 的召回率相比最先进方法提高了 76%–87%;在漏洞引入检测任务中,其 F1 分数提高了 15%–27%。

英文摘要:

Version control systems are commonly used to manage open-source software, in which each commit may introduce new vulnerabilities or fix existing ones. Researchers have developed various tools for detecting vulnerabilities in code commits, but their performance is limited by factors such as neglecting descriptive data and challenges in accurately identifying vulnerability introductions. To overcome these limitations, we propose CommitShield, which combines the code analysis capabilities of static analysis tools with the natural language and code understanding capabilities of large language models (LLMs) to enhance the accuracy of vulnerability introduction and fix detection by generating precise descriptions and obtaining rich patch contexts. We evaluate CommitShield using the newly constructed vulnerability repair dataset, CommitVulFix, and a cleaned vulnerability introduction dataset. Experimental results indicate that CommitShield improves recall by 76%-87% over state-of-the-art methods in the vulnerability fix detection task, and its F1-score improves by 15%-27% in the vulnerability introduction detection task.

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

↑