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

通过捕获提交中的结构增强安全补丁识别

Enhancing Security Patch Identification by Capturing Structures in Commits

Bozhi Wu, Shangqing Liu, Ruitao Feng, Xiaofei Xie, Jingkai Siow, Shang-Wei Lin

摘要:

随着开源软件(OSS)数量的迅速增加,开源组件中的大多数软件漏洞都是静默修复的,这导致集成它们的部署软件无法及时更新。因此,设计一个安全补丁识别系统来确保所使用软件的安全性是至关重要的。然而,现有的安全补丁识别方法大多只将修改后的代码和提交的提交信息看作是一个扁平的令牌序列,用简单的神经网络学习其语义,而忽略了结构信息。为了解决这些限制,在本文中,我们提出了我们精心设计的方法E-SPI,它提取隐藏在提交中的结构信息进行有效的识别。具体来说,它包括代码更改编码器和消息编码器,代码更改编码器使用BiLSTM提取更改代码的语法以学习代码表示,消息编码器使用图神经网络(GNN)构建提交消息的依赖图以学习消息表示。我们通过嵌入与更改的代码相关的上下文信息来进一步增强代码更改编码器。为了证明我们的方法的有效性,我们进行了广泛的实验,对现有的数据集和真实的部署环境中的六个国家的最先进的方法。实验结果证实,我们的方法可以显着优于目前最先进的基线。

英文摘要:

With the rapid increasing number of open source software (OSS), the majority of the software vulnerabilities in the open source components are fixed silently, which leads to the deployed software that integrated them being unable to get a timely update. Hence, it is critical to design a security patch identification system to ensure the security of the utilized software. However, most of the existing works for security patch identification just consider the changed code and the commit message of a commit as a flat sequence of tokens with simple neural networks to learn its semantics, while the structure information is ignored. To address these limitations, in this paper, we propose our well-designed approach E-SPI, which extracts the structure information hidden in a commit for effective identification. Specifically, it consists of the code change encoder to extract the syntactic of the changed code with the BiLSTM to learn the code representation and the message encoder to construct the dependency graph for the commit message with the graph neural network (GNN) to learn the message representation. We further enhance the code change encoder by embedding contextual information related to the changed code. To demonstrate the effectiveness of our approach, we conduct the extensive experiments against six state-of-the-art approaches on the existing dataset and from the real deployment environment. The experimental results confirm that our approach can significantly outperform current state-of-the-art baselines.

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

↑