Detecting Software Vulnerabilities Based on Hierarchical Graph Attention Network.

Wenlin Xu,Tong Li,Jinsong Wang,Tao Fu,Yahui Tang
DOI: https://doi.org/10.1007/978-981-99-9119-8_11
2024-01-01
Abstract:Detecting software vulnerabilities is a crucial part of software security. At present, the most commonly used methods are to train supervised classification or regression models from the source code to detect vulnerabilities, which require lots of high-quality labeled vulnerabilities. However, high-quality labeled vulnerabilities are not easy to be obtained in practical applications. To alleviate this problem, we present an effective and unsupervised method to detect software vulnerabilities. We first propose a new source code representation that maintains both the source code’s natural language information and high-level programming logic information, and then we effectively embed the software function into a compact and low-dimensional representation based on hierarchical graph attention network. Finally, we obtain vulnerabilities by applying an outlier detection algorithm on the low-dimensional representation. We carry out extensive experiments on six datasets and the effectiveness of our proposed method is demonstrated by the experimental results.
What problem does this paper attempt to address?