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

ReposVul:一个仓库级高质量漏洞数据集

ReposVul: A Repository-Level High-Quality Vulnerability Dataset

Xinchen Wang, Ruida Hu, Cuiyun Gao, Xin-Cheng Wen, Yujia Chen, Qing Liao

AI总结:

针对现有漏洞数据集的补丁纠缠、缺乏跨过程漏洞和过时补丁问题,提出自动化数据收集框架并构建首个仓库级高质量漏洞数据集ReposVul,包含解缠、多粒度依赖提取和痕迹过滤三个模块。

摘要:

开源软件(OSS)漏洞给软件安全带来了巨大挑战,并对我们的社会构成潜在风险。人们投入了大量精力进行自动化漏洞检测,其中基于深度学习(DL)的方法已被证明是最有效的。然而,当前的有标签数据存在以下局限性:(1)纠缠补丁:开发人员可能会在补丁中提交与漏洞修复无关的代码更改,导致补丁纠缠不清。(2)缺乏跨过程漏洞:现有的漏洞数据集通常包含函数级和文件级漏洞,忽略了函数之间的关系,从而使方法无法检测跨过程漏洞。(3)过时补丁:现有数据集通常包含过时补丁,这可能会在训练期间使模型产生偏差。为了解决上述局限性,在本文中,我们提出了一种自动化数据收集框架,并构建了第一个名为ReposVul的仓库级高质量漏洞数据集。所提出的框架主要包含三个模块:(1)漏洞解缠模块,旨在从纠缠补丁中区分与漏洞修复相关的代码更改,其中联合使用了大型语言模型(LLMs)和静态分析工具。(2)多粒度依赖提取模块,旨在捕获漏洞的跨过程调用关系,其中我们为每个漏洞补丁构建多粒度信息,包括仓库级、文件级、函数级和行级。(3)基于痕迹的过滤模块,旨在过滤过时补丁,该模块利用文件路径痕迹过滤器和提交时间痕迹过滤器来构建最新数据集。

英文摘要:

Open-Source Software (OSS) vulnerabilities bring great challenges to the software security and pose potential risks to our society. Enormous efforts have been devoted into automated vulnerability detection, among which deep learning (DL)-based approaches have proven to be the most effective. However, the current labeled data present the following limitations: (1) Tangled Patches: Developers may submit code changes unrelated to vulnerability fixes within patches, leading to tangled patches. (2) Lacking Inter-procedural Vulnerabilities: The existing vulnerability datasets typically contain function-level and file-level vulnerabilities, ignoring the relations between functions, thus rendering the approaches unable to detect the inter-procedural vulnerabilities. (3) Outdated Patches: The existing datasets usually contain outdated patches, which may bias the model during training. To address the above limitations, in this paper, we propose an automated data collection framework and construct the first repository-level high-quality vulnerability dataset named ReposVul. The proposed framework mainly contains three modules: (1) A vulnerability untangling module, aiming at distinguishing vulnerability-fixing related code changes from tangled patches, in which the Large Language Models (LLMs) and static analysis tools are jointly employed. (2) A multi-granularity dependency extraction module, aiming at capturing the inter-procedural call relationships of vulnerabilities, in which we construct multiple-granularity information for each vulnerability patch, including repository-level, file-level, function-level, and line-level. (3) A trace-based filtering module, aiming at filtering the outdated patches, which leverages the file path trace-based filter and commit time trace-based filter to construct an up-to-date dataset.

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

↑