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

Vignat:通过图注意力网络学习代码语义进行漏洞识别

Vignat: Vulnerability identification by learning code semantics via graph attention networks

Columbia University(哥伦比亚大学)

Shuo Liu, Gail Kaiser

AI总结:

本文提出基于图注意力网络的漏洞识别框架 Vignat,通过细粒度代码属性图学习代码语义表示,在 C 库数据集上实现 57.38% 准确率,并利用模型可解释性揭示漏洞模式。

摘要:

漏洞识别对于保护软件系统免受网络攻击至关重要。然而,大型项目拥有超过数百万行代码,复杂的依赖关系使得传统的静态和动态方法难以实施。此外,不同类型漏洞的语义结构差异很大且可能同时出现,使得基于通用规则的方法难以扩展。在本文中,我们提出了 Vignat,一种新颖的基于注意力的框架,通过学习代码的图级语义表示来识别漏洞。我们使用细粒度的代码属性图(CPGs)表示代码,并使用图注意力网络(GATs)进行漏洞检测。结果表明,Vignat 在源自流行 C 语言库的可靠数据集上能够达到 57.38% 的准确率。此外,我们的 GATs 的可解释性为漏洞模式提供了有价值的见解。

英文摘要:

Vulnerability identification is crucial to protect software systems from attacks for cyber-security. However, huge projects have more than millions of lines of code, and the complex dependencies make it hard to carry out traditional static and dynamic methods. Furthermore, the semantic structure of various types of vulnerabilities differs greatly and may occur simultaneously, making general rule-based methods difficult to extend. In this paper, we propose \textit{Vignat}, a novel attention-based framework for identifying vulnerabilities by learning graph-level semantic representations of code. We represent codes with code property graphs (CPGs) in fine grain and use graph attention networks (GATs) for vulnerability detection. The results show that Vignat is able to achieve $57.38\%$ accuracy on reliable datasets derived from popular C libraries. Furthermore, the interpretability of our GATs provides valuable insights into vulnerability patterns.

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

↑