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

使用静态代码分析器检测开源存储库中的安全修复

Detecting Security Fixes in Open-Source Repositories using Static Code Analyzers

Tilburg University(蒂尔堡大学);SAP Security Research(SAP安全研究院);Eindhoven University of Technology(埃因霍温理工大学)

Therese Fehrer, Rocío Cabrera Lozoya, Antonino Sabetta, Dario Di Nucci, Damian A. Tamburri

摘要:

关于影响开放源码软件(OSS)的脆弱性的可靠的代码级信息的来源很少,这阻碍了广泛采用提供脆弱的OSS依赖性的代码级检测和评估的高级工具。在本文中,我们研究了在何种程度上现成的静态代码分析器的输出可以被用作一个来源的功能,以代表提交机器学习(ML)的应用程序。特别是,我们研究如何使用这些功能来构建嵌入和训练ML模型,以自动识别包含漏洞修复的源代码提交。我们分析了安全相关和非安全相关提交的嵌入,我们表明,尽管孤立地看,它们在统计上没有显著差异,我们还发现,我们的方法与commit2vec的结合代表了对自动化领域现有技术的切实改进。识别修复漏洞提交:我们构建的ML模型和commit2vec是互补的,前者更普遍适用,尽管不那么准确。

英文摘要:

The sources of reliable, code-level information about vulnerabilities that affect open-source software (OSS) are scarce, which hinders a broad adoption of advanced tools that provide code-level detection and assessment of vulnerable OSS dependencies. In this paper, we study the extent to which the output of off-the-shelf static code analyzers can be used as a source of features to represent commits in Machine Learning (ML) applications. In particular, we investigate how such features can be used to construct embeddings and train ML models to automatically identify source code commits that contain vulnerability fixes. We analyze such embeddings for security-relevant and non-security-relevant commits, and we show that, although in isolation they are not different in a statistically significant manner, it is possible to use them to construct a ML pipeline that achieves results comparable with the state of the art. We also found that the combination of our method with commit2vec represents a tangible improvement over the state of the art in the automatic identification of commits that fix vulnerabilities: the ML models we construct and commit2vec are complementary, the former being more generally applicable, albeit not as accurate.

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

↑