Detecting Source Code Vulnerabilities Using Fine-Tuned Pre-Trained LLMs
Pre-trained large language models (LLMs) have advanced capabilities in feature extraction and pattern discovery. Utilizing fine-tuning techniques effectively adapts LLMs to specific scenarios. Detecting vulnerabilities during the coding phase is crucial. In this paper, we collected the Java CWE vulnerability from the SARD dataset and then supervised fine-tuned the open-source Qwen2-7B model using the LoRA technique. We compared the results with vulnerability detection models based on Graph Neural Networks (GNN) and Long Short-Term Memory (LSTM). It is demonstrated that the approach of fine-tuning for LLMs can effectively detect source code vulnerabilities.
Authors
- Jin Zhu (ORCID: https://orcid.org/0000-0003-1005-5841)
- Yunlai Zhou (ORCID: https://orcid.org/0000-0002-2347-647X)
- Jinsheng Xiao
- Rui Luo (ORCID: https://orcid.org/0000-0002-1966-251X)
- Hui Ge (ORCID: https://orcid.org/0000-0002-2713-6659)
- Yun-Ming Sun (ORCID: https://orcid.org/0009-0003-9572-6209)
Publication Details
- Published
- 2024-10-28
- DOI
- https://doi.org/10.1109/icsp62129.2024.10846595
- Citations
- 1
- Primary Topic
- Web Application Security Vulnerabilities
- Type
- article
- Field-Weighted Citation Impact
- 0.78