arrow
Return

SecureQwen: Leveraging LLMs for vulnerability detection in python codebases

delete2025-01-01
delete0
PRE
AI
A
Abdechakour Mechri
M
Mohamed Amine Ferrag *
M
Mérouane Debbah
DOI:10.1016/j.cose.2024.104151delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Identifying vulnerabilities in software code is crucial for ensuring the security of modern systems. However, manual detection requires expert knowledge and is time-consuming, underscoring the need for automated techniques. In this paper, we present SecureQwen, a novel vulnerability detection tool leveraging large language models (LLMs) with a context length of 64K tokens to identify potential security threats in largescale Python codebases. Utilizing a decoder-only transformer architecture, SecureQwen captures complex relationships between code tokens, enabling accurate classification of vulnerable code sequences across 14 common weakness enumerations (CWEs), including OS Command Injection, SQL Injection, Improper Check or Handling of Exceptional Conditions, Path Traversal, Broken or Risky Cryptographic Algorithm, Deserialization of Untrusted Data, and Cleartext Transmission of Sensitive Information. Therefore, we evaluate SecureQwen on a large Python dataset with over 1.875 million function-level code snippets from different sources, including GitHub repositories, Codeparrot's dataset, and synthetic data generated by GPT4-o. The experimental evaluation demonstrates high accuracy, with F1 scores ranging from 84% to 99%. The results indicate that SecureQwen effectively detects vulnerabilities in human-written and AI-generated code.
Keywords:
Static analysis
Vulnerability detection
Codebase
Large language model
Software security
Security
Generative pre-trained transformers

Journal

C
Computers and Security
IF:
5.4
Papers:
4.6K
Citations:
1.4W

Organization

U
universite 8 mai 1945 de guelma
Scholars:
678
Papers: 526
Citations: 1
T
Technology Innovation Institute
Scholars:
604
Papers: 520
Citations: 615
Cited Papers

Cited Papers

On Hardware Security Bug Code Fixes by Prompting Large Language Models
err2024-01-01
err17
errOAAI
errAhmad, Baleegh; Thakur, Shailja; Tan, Benjamin; Karri, Ramesh; Pearce, Hammond
errShare
errSave
Programmed sample delivery on a pressurized paper
err2014-10-24
err0
errOAAI
errJoong Ho Shin; Juhwan Park; Seung Hoon Kim; Je-Kyun Park
errShare
errSave
Python source code vulnerability detection with named entity recognition
err2024-05-01
err4
PREAI
errEhrenberg, Melanie; Sarkani, Shahram; Mazzuchi, Thomas A.
errShare
errSave
errShare
errSave
SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilities
err2022-07-01
err261
errOAAI
errLi, Zhen; Zou, Deqing; Xu, Shouhuai; Jin, Hai; Zhu, Yawei; Chen, Zhaoxuan
errShare
errSave
VUDENC: Vulnerability Detection with Deep Learning on a Natural Codebase for Python
err2022-04-01
err57
errOAAI
errWartschinski, Laura; Noller, Yannic; Vogel, Thomas; Kehrer, Timo; Grunske, Lars
errShare
errSave
errShare
errSave
Exploration of zinc borophosphate glasses as dispersion media for SiAlON phosphors
err2020-01-17
err0
PREAI
errHiroyo Segawa; Shinobu Ohki; Kenzo Deguchi; Tadashi Shimizu; Naoto Hirosaki
errShare
errSave
The Effect of Boron Oxide on Phosphate Ion Released from Borosilicate Glass in Seawater
err2016-01-08
err0
PREAI
errNurul Fariha Yusof; Ku Halim Ku Bulat; Nur Azam Badarulzaman; Mohd Al Amin Muhamad Nor
errShare
errSave
researcher View more