| 网络与信息安全学报 | |
| Code vulnerability detection method based ongraph neural network | |
| CHEN Hao, YI Ping1  | |
| [1] School of Cyber Science and Engineering, Shanghai Jiao Tong University, Shanghai 200240, China; | |
| 关键词: vulnerability detection; graph neural network; control flow graph; intermediate representation; | |
| DOI : 10.11959/j.issn.2096-109x.2021039 | |
| 来源: DOAJ | |
【 摘 要 】
The schemes of using neural networks for vulnerability detection are mostly based on traditional natural language processing ideas, processing the code as array samples and ignoring the structural features in the code, which may omit possible vulnerabilities. A code vulnerability detection method based on graph neural network was proposed, which realized function-level code vulnerability detection through the control flow graph feature of the intermediate language. Firstly, the source code was compiled into an intermediate representation, and then the control flow graph containing structural information was extracted. At the same time, the word vector embedding algorithm was used to initialize the vector of basic block to extract the code semantic information. Then both of above were spliced to generate the graph structure sample data. The multilayer graph neural network model was trained and tested on graph structure data features. The open source vulnerability sample data set was used to generate test data to evaluate the method proposed. The results show that the method effectively improves the vulnerability detection ability.
【 授权许可】
Unknown