AIセキュリティポータル K Program
Large Language Models for Secure Code Assessment: A Multi-Language Empirical Study
Share
Abstract
Most vulnerability detection studies focus on datasets of vulnerabilities in C/C++ code, offering limited language diversity. Thus, the effectiveness of deep learning methods, including large language models (LLMs), in detecting software vulnerabilities beyond these languages is still largely unexplored. In this paper, we evaluate the effectiveness of LLMs in detecting and classifying Common Weakness Enumerations (CWE) using different prompt and role strategies. Our experimental study targets six state-of-the-art pre-trained LLMs (GPT-3.5- Turbo, GPT-4 Turbo, GPT-4o, CodeLLama-7B, CodeLLama- 13B, and Gemini 1.5 Pro) and five programming languages: Python, C, C++, Java, and JavaScript. We compiled a multi-language vulnerability dataset from different sources, to ensure representativeness. Our results showed that GPT-4o achieves the highest vulnerability detection and CWE classification scores using a few-shot setting. Aside from the quantitative results of our study, we developed a library called CODEGUARDIAN integrated with VSCode which enables developers to perform LLM-assisted real-time vulnerability analysis in real-world security scenarios. We have evaluated CODEGUARDIAN with a user study involving 22 developers from the industry. Our study showed that, by using CODEGUARDIAN, developers are more accurate and faster at detecting vulnerabilities.
Internet security glossary, version 2
R. Shirey
Published: 2007
Firmalice-automatic detection of authentication bypass vulnerabilities in binary firmware
Y. Shoshitaishvili, R. Wang, C. Hauser, C. Kruegel, G. Vigna
Published: 2015
Dynamic malware analysis in the modern era—a state of the art survey
O. Or-Meir, N. Nissim, Y. Elovici, L. Rokach
Published: 2019
Sifu - a Cybersecurity Awareness Platform With Challenge Assessment and Intelligent Coach
T. Espinha Gasiba, U. Lechner, M. Pinto-Albuquerque
Published: 2020
A survey of static analysis methods for identifying security vulnerabilities in software systems
M. Pistoia, S. Chandra, S. J. Fink, E. Yahav
Published: 2007
A comparative study of automatic program repair techniques for security vulnerabilities
E. Pinconschi, R. Abreu, P. Adao
Published: 2021
Transformer-based language models for software vulnerability detection
C. Thapa, S. I. Jang, M. E. Ahmed, S. Camtepe, J. Pieprzyk, S. Nepal
Published: 2022
Low level source code vulnerability detection using advanced bert language model
Mansour Alqarni, Akramul Azim
Published: 2022
DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detection
Yizheng Chen, Zhoujie Ding, Lamya Alowain, Xinyun Chen, David Wagner
Published: 2023.4.2
Why don’t software developers use static analysis tools to find bugs?
B. Johnson, Y. Song, E. Murphy-Hill, R. Bowdidge
Published: 2013
Continuous Security Testing: A Case Study on Integrating Dynamic Security Testing Tools in CI/CD Pipelines
T. Rangnau, R. V. Buijtenen, F. Fransen, F. Turkmen
Published: 2020
I’m Sorry Dave, I’m Afraid I Can’t Fix Your Code: On ChatGPT, CyberSecurity, and Secure Coding
T. Espinha Gasiba, K. Oguzhan, I. Kessba, U. Lechner, M. Pinto-Albuquerque
Published: 2023
Automated vulnerability detection in source code using deep representation learning
Rebecca L. Russell, Louis Y. Kim, Lei H. Hamilton, Tomo Lazovich, Jacob Harer, Onur Ozdemir, Paul M. Ellingwood, Marc W. McConley
Published: 2018
The rise of software vulnerability: Taxonomy of software vulnerabilities detection and machine learning approaches
H. Hanif, M. H. N. Md Nasir, M. F. Ab Razak, A. Firdaus, N. B. Anuar
Published: 2021
Automatic feature learning for predicting vulnerable software components
Hoa Khanh Dam, Truyen Tran, Trang Pham, Shien Wee Ng, John Grundy, Aditya Ghose
Published: 2021
Attention is all you need
A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. u. Kaiser, I. Polosukhin
Published: 2017
Large language model for vulnerability detection: Emerging results and future directions
Xin Zhou, Ting Zhang, David Lo
Published: 2024
Comparison and evaluation on static application security testing (sast) tools for java
K. Li, S. Chen, L. Fan, R. Feng, H. Liu, C. Liu, Y. Liu, Y. Chen
Published: 2023
AC/C++ code vulnerability dataset with code changes and CVE summaries
Jiahao Fan, Yi Li, Shaohua Wang, Tien N Nguyen
Published: 2020
Large Language Models for Code: Security Hardening and Adversarial Testing
Jingxuan He, Martin Vechev
Published: 2023.2.11
Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networks
Yaqin Zhou, Shangqing Liu, Jingkai Siow, Xiaoning Du, Yang Liu
Published: 2019.9.9
D2A: A dataset built for ai-based vulnerability detection methods using differential analysis
Yunhui Zheng, Saurabh Pujar, Burn Lewis, et al.
Published: 2021
Data quality for software vulnerability datasets
Roland Croft, M Ali Babar, M Mehdi Kholoosi
Published: 2023
Challenging machine learning algorithms in predicting vulnerable javascript functions
R. Ferenc, P. Hegedus, P. Gyimesi, G. Antal, D. B ˝ an, T. Gyimothy
Published: 2019
Transformers: State-of-the-art natural language processing
T. W. et al.
Published: 2020
On a test of whether one of two random variables is stochastically larger than the other
H. B. Mann, D. R. Whitney
Published: 1947
Security Testing: A Survey
M. Felderer, M. Buchler, M. Johns, A. D. Brucker, R. Breu, A. Pretschner
Published: 2016
A new approach to web application security: Utilizing gpt language models for source code inspection
Z. Szabo, V. Bilicki
Published: 2023
Share