arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.13375cs.SEcs.CRcs.LG
收藏

将漏洞通告自动映射到开源仓库中其修复提交的方法

Automated Mapping of Vulnerability Advisories onto their Fix Commits in Open Source Repositories

Eindhoven University of Technology - JADS(埃因霍温理工大学-JADS);SAP Security Research(思爱普安全研究院);University of Trento(特伦托大学);University of Salerno(萨勒诺大学)

Daan Hommersom, Antonino Sabetta, Bonaventura Coppola, Dario Di Nucci, Damian A. Tamburri

AI总结:

本文提出结合启发式规则与NLP的三阶段方法,并通过FixFinder自动将漏洞通告映射到开源仓库中的修复提交,在1,248条通告上Top-10命中率达84.03%。

摘要:

缺乏全面且准确的漏洞数据来源,是研究和理解软件漏洞(及其修复)的一个关键障碍。在本文中,我们提出一种结合源于实践经验的启发式方法与机器学习(ML)——具体而言是自然语言处理(NLP)——的方法,以解决这一问题。我们的方法包含三个阶段。首先,从以自然语言表述的漏洞通告中提取一条通告记录,其中包含有关某一漏洞的关键信息。其次,利用启发式方法,从受影响项目的源代码仓库中过滤掉已知与当前任务无关的提交,从而获得候选修复提交的一个子集。最后,对于每个此类候选提交,我们的方法构建一个数值特征向量,用以反映该提交中与预测其是否匹配当前通告相关的特征。随后,这些特征向量被用于生成最终的候选修复提交排序列表。ML模型赋予每个特征的分数对用户保持可见,从而使用户能够解释预测结果。我们使用名为FixFinder的原型实现,在一个人工整理的数据集上评估了所提方法;该数据集包含2,391个已知修复提交,对应1,248条公开漏洞通告。在考虑排序结果中前10个提交时,我们的实现能够为多达84.03%的漏洞成功识别出至少一个修复提交(其中65.06%的漏洞有一个修复提交位于第一位)。总之,我们的方法显著减少了在OSS仓库中搜索修复已知漏洞的提交所需的工作量。

英文摘要:

The lack of comprehensive sources of accurate vulnerability data represents a critical obstacle to studying and understanding software vulnerabilities (and their corrections). In this paper, we present an approach that combines heuristics stemming from practical experience and machine-learning (ML) - specifically, natural language processing (NLP) - to address this problem. Our method consists of three phases. First, an advisory record containing key information about a vulnerability is extracted from an advisory (expressed in natural language). Second, using heuristics, a subset of candidate fix commits is obtained from the source code repository of the affected project by filtering out commits that are known to be irrelevant for the task at hand. Finally, for each such candidate commit, our method builds a numerical feature vector reflecting the characteristics of the commit that are relevant to predicting its match with the advisory at hand. The feature vectors are then exploited for building a final ranked list of candidate fixing commits. The score attributed by the ML model to each feature is kept visible to the users, allowing them to interpret the predictions. We evaluated our approach using a prototype implementation named FixFinder on a manually curated data set that comprises 2,391 known fix commits corresponding to 1,248 public vulnerability advisories. When considering the top-10 commits in the ranked results, our implementation could successfully identify at least one fix commit for up to 84.03% of the vulnerabilities (with a fix commit on the first position for 65.06% of the vulnerabilities). In conclusion, our method reduces considerably the effort needed to search OSS repositories for the commits that fix known vulnerabilities.

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

↑