arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.07540cs.SEcs.CR
收藏

PatchSeeker:利用LLM生成的提交和嵌入将NVD记录映射到其漏洞修复提交

PatchSeeker: Mapping NVD Records to their Vulnerability-fixing Commits with LLM Generated Commits and Embeddings

Huu Hung Nguyen, Anh Tuan Nguyen, Thanh Le-Cong, Yikun Li, Han Wei Ang, Yide Yin, Frank Liauw, Shar Lwin Khin, Ouh Eng Lieh, Ting Zhang, David Lo

AI总结:

PatchSeeker利用大语言模型生成提交摘要和嵌入,将NVD漏洞记录映射到修复提交,在基准上比Prospector提升59.3% MRR和27.9% Recall@10。

摘要:

软件漏洞对现代软件生态系统构成严重风险。虽然国家漏洞数据库(NVD)是编目这些漏洞的权威来源,但它通常缺乏指向相应漏洞修复提交(VFCs)的显式链接。VFCs编码了精确的代码更改,从而支持漏洞定位、补丁分析和数据集构建。因此,自动将NVD记录映射到其真实的VFCs至关重要。现有方法存在局限性,因为它们依赖于稀疏且常常嘈杂的提交消息,并且未能捕捉漏洞描述中的深层语义。为解决这一差距,我们引入了PatchSeeker,一种新颖的方法,利用大型语言模型在漏洞描述及其VFCs之间创建丰富的语义链接。PatchSeeker从NVD描述中生成嵌入,并通过为简短或无信息的提交消息合成详细摘要来增强提交消息。这些生成的消息充当语义桥梁,有效弥合了自然语言报告与底层代码更改之间的信息鸿沟。我们的方法PatchSeeker在基准数据集上比最佳基线Prospector实现了59.3%更高的MRR和27.9%更高的Recall@10。对近期CVE的扩展评估进一步证实了PatchSeeker的有效性。消融研究表明,提交消息生成方法和骨干LLM的选择都对PatchSeeker做出了积极贡献。我们还讨论了局限性和开放挑战,以指导未来的工作。

英文摘要:

Software vulnerabilities pose serious risks to modern software ecosystems. While the National Vulnerability Database (NVD) is the authoritative source for cataloging these vulnerabilities, it often lacks explicit links to the corresponding Vulnerability-Fixing Commits (VFCs). VFCs encode precise code changes, enabling vulnerability localization, patch analysis, and dataset construction. Automatically mapping NVD records to their true VFCs is therefore critical. Existing approaches have limitations as they rely on sparse, often noisy commit messages and fail to capture the deep semantics in the vulnerability descriptions. To address this gap, we introduce PatchSeeker, a novel method that leverages large language models to create rich semantic links between vulnerability descriptions and their VFCs. PatchSeeker generates embeddings from NVD descriptions and enhances commit messages by synthesizing detailed summaries for those that are short or uninformative. These generated messages act as a semantic bridge, effectively closing the information gap between natural language reports and low-level code changes. Our approach PatchSeeker achieves 59.3% higher MRR and 27.9% higher Recall@10 than the best-performing baseline, Prospector, on the benchmark dataset. The extended evaluation on recent CVEs further confirms PatchSeeker's effectiveness. Ablation study shows that both the commit message generation method and the selection of backbone LLMs make a positive contribution to PatchSeeker. We also discuss limitations and open challenges to guide future work.

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

↑