Software Vulnerability and Functionality Assessment using LLMs

Rasmus Ingemann Tuffveson Jensen, Vali Tawosi, Salwa Alamir
3/13/2024
cs.SEcs.AI

No confident code implementation found for this paper.

Abstract

While code review is central to the software development process, it can be tedious and expensive to carry out. In this paper, we investigate whether and how Large Language Models (LLMs) can aid with code reviews. Our investigation focuses on two tasks that we argue are fundamental to good reviews: (i) flagging code with security vulnerabilities and (ii) performing software functionality validation, i.e., ensuring that code meets its intended functionality. To test performance on both tasks, we use zero-shot and chain-of-thought prompting to obtain final ``approve or reject'' recommendations. As data, we employ seminal code generation datasets (HumanEval and MBPP) along with expert-written code snippets with security vulnerabilities from the Common Weakness Enumeration (CWE). Our experiments consider a mixture of three proprietary models from OpenAI and smaller open-source LLMs. We find that the former outperforms the latter by a large margin. Motivated by promising results, we finally ask our models to provide detailed descriptions of security vulnerabilities. Results show that 36.7% of LLM-generated descriptions can be associated with true CWE vulnerabilities.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{jensen2024software,
  title  = {Software Vulnerability and Functionality Assessment using LLMs},
  author = {Rasmus Ingemann Tuffveson Jensen and Vali Tawosi and Salwa Alamir},
  year   = {2024},
  eprint = {2403.08429},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.08429v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.08429.svg)](https://codeofpaper.com/paper/2403.08429)

Discussion