Software vulnerability detection (SVD) in source code remains a significant challenge, capturing the attention of researchers due to its critical importance. Numerous automated detection techniques have emerged, leveraging deep learning and large language models. Graph Neural Network models have been used for SVD and have shown promising results. However, graph-based models often struggle to capture long-term dependencies within code snippets due to simplistic hop neighborhood encoding. This study explores the potential of enhancing graph neural networks by capturing both local and global complex code structures through node and edge embeddings. By generating contextualised embeddings using Node2vec model, we aim to enrich the model’s understanding of source code through an advanced subgraph construction. Our results demonstrate an improvement in the detection capabilities of graph neural networks for identifying vulnerabilities at the statement level in Java source code. Specifically, the proposed approach has achieved a detection precision of up to \(82.08\%\) (i.e., improvement of \(11.33\%\) ), enhancing the model’s noise robustness and detection capability.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Enhanced Graph Neural Networks for Vulnerability Detection in Java via Advanced Subgraph Construction

  • Rosmaël Zidane Lekeufack Foulefack,
  • Alessandro Marchetto

摘要

Software vulnerability detection (SVD) in source code remains a significant challenge, capturing the attention of researchers due to its critical importance. Numerous automated detection techniques have emerged, leveraging deep learning and large language models. Graph Neural Network models have been used for SVD and have shown promising results. However, graph-based models often struggle to capture long-term dependencies within code snippets due to simplistic hop neighborhood encoding. This study explores the potential of enhancing graph neural networks by capturing both local and global complex code structures through node and edge embeddings. By generating contextualised embeddings using Node2vec model, we aim to enrich the model’s understanding of source code through an advanced subgraph construction. Our results demonstrate an improvement in the detection capabilities of graph neural networks for identifying vulnerabilities at the statement level in Java source code. Specifically, the proposed approach has achieved a detection precision of up to \(82.08\%\) (i.e., improvement of \(11.33\%\) ), enhancing the model’s noise robustness and detection capability.