Prompt-Enhanced Software Vulnerability Detection Using ChatGPT

08/24/2023
by   Chenyuan Zhang, et al.
0

With the increase in software vulnerabilities that cause significant economic and social losses, automatic vulnerability detection has become essential in software development and maintenance. Recently, large language models (LLMs) like GPT have received considerable attention due to their stunning intelligence, and some studies consider using ChatGPT for vulnerability detection. However, they do not fully consider the characteristics of LLMs, since their designed questions to ChatGPT are simple without a specific prompt design tailored for vulnerability detection. This paper launches a study on the performance of software vulnerability detection using ChatGPT with different prompt designs. Firstly, we complement previous work by applying various improvements to the basic prompt. Moreover, we incorporate structural and sequential auxiliary information to improve the prompt design. Besides, we leverage ChatGPT's ability of memorizing multi-round dialogue to design suitable prompts for vulnerability detection. We conduct extensive experiments on two vulnerability datasets to demonstrate the effectiveness of prompt-enhanced vulnerability detection using ChatGPT. We also analyze the merit and demerit of using ChatGPT for vulnerability detection.

READ FULL TEXT

page 5

page 6

page 10

research
03/09/2021

Vulnerability Detection is Just the Beginning

Vulnerability detection plays a key role in secure software development....
research
03/10/2022

LineVD: Statement-level Vulnerability Detection using Graph Neural Networks

Current machine-learning based software vulnerability detection methods ...
research
01/05/2018

VulDeePecker: A Deep Learning-Based System for Vulnerability Detection

The automatic detection of software vulnerabilities is an important rese...
research
04/29/2021

A comparative study of neural network techniques for automatic software vulnerability detection

Software vulnerabilities are usually caused by design flaws or implement...
research
04/07/2022

Transformer-Based Language Models for Software Vulnerability Detection: Performance, Model's Security and Platforms

The large transformer-based language models demonstrate excellent perfor...
research
02/11/2021

Why Don't Developers Detect Improper Input Validation?'; DROP TABLE Papers; –

Improper Input Validation (IIV) is a software vulnerability that occurs ...
research
09/11/2023

FuzzLLM: A Novel and Universal Fuzzing Framework for Proactively Discovering Jailbreak Vulnerabilities in Large Language Models

Jailbreak vulnerabilities in Large Language Models (LLMs), which exploit...

Please sign up or login with your details

Forgot password? Click here to reset