用图神经网络分析代码图谱,提升漏洞检测精度
Enhancing Software Vulnerability Detection Using Code Property Graphs and Convolutional Neural Networks
- 将代码抽象为属性图,融合语法、控制流与依赖关系
- 基于图卷积网络实现函数级漏洞分类,准确率显著提升
- 开源包含漏洞类型标注的代码图数据集,适合安全研究者使用
现代软件系统复杂度上升导致漏洞增多,传统静态与动态分析在可扩展性和自动化方面存在局限。本文提出一种结合代码属性图与机器学习的新方法,通过整合抽象语法树、控制流图和程序依赖图,构建细粒度的代码表征,提升漏洞检测的准确性和粒度。采用适配图数据的卷积神经网络模型处理该表征,实现可扩展且自动化的漏洞检测。研究还构建了一个新生成的数据集,从开源仓库中提取并标注函数级漏洞类型。贡献包括代码到属性图的转换方法、图卷积神经网络的实现,以及用于训练与评估的综合性数据集,为复杂软件系统中的高效漏洞检测奠定基础。
原文摘要 · Abstract (English)
The increasing complexity of modern software systems has led to a rise in vulnerabilities that malicious actors can exploit. Traditional methods of vulnerability detection, such as static and dynamic analysis, have limitations in scalability and automation. This paper proposes a novel approach to detecting software vulnerabilities using a combination of code property graphs and machine learning techniques. By leveraging code property graphs, which integrate abstract syntax trees, control flow graphs, and program dependency graphs, we achieve a detailed representation of software code that enhances the accuracy and granularity of vulnerability detection. We introduce various neural network models, including convolutional neural networks adapted for graph data, to process these representations. Our approach provides a scalable and automated solution for vulnerability detection, addressing the shortcomings of existing methods. We also present a newly generated dataset labeled with function-level vulnerability types sourced from open-source repositories. Our contributions include a methodology for transforming software code into code property graphs, the implementation of a convolutional neural network model for graph data, and the creation of a comprehensive dataset for training and evaluation. This work lays the foundation for more effective and efficient vulnerability detection in complex software systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。