LLMSecEval: A Dataset of Natural Language Prompts for Security Evaluations

By Catherine Tony, Markus Mutas, Nicolás E. Díaz Ferreyra, Riccardo Scandariato. 2023

118 citations recorded by the source corpus.

Large Language Models (LLMs) like Codex are powerful tools for performing code completion and code generation tasks as they are trained on billions of lines of code from publicly available sources. Moreover, these models are capable of generating code snippets from Natural Language (NL) descriptions by learning languages and programming practices from public GitHub repositories. Although LLMs promise an effortless NL-driven deployment of software applications, the security of the code they generate has not been extensively investigated nor documented. In this work, we present LLMSecEval, a dataset containing 150 NL prompts that can be leveraged for assessing the security performance of such models. Such prompts are NL descriptions of code snippets prone to various security vulnerabilities listed in MITRE’s Top 25 Common Weakness Enumeration (CWE) ranking. Each prompt in our dataset comes with a secure implementation example to facilitate comparative evaluations against code produced by LLMs. As a practical application, we show how LLMSecEval can be used for evaluating the security of snippets automatically generated from NL descriptions.

Subfields: Artificial Intelligence, Information Systems, Large Language Models, Evaluation & Benchmarks, Safety, Robustness & Interpretability

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Armando Solar-Lezama
  2. Koushik Sen
  3. Naman Jain
  4. Tianjun Zhang
  5. Wen-Ding Li
  6. Ion Stoica
  7. Abhijeet Awasthi
  8. Swarat Chaudhuri

In Information Systems

  1. Armando Solar-Lezama
  2. Koushik Sen
  3. Naman Jain
  4. Tianjun Zhang
  5. Ion Stoica
  6. Rishabh Singh
  7. Mosharaf Chowdhury
  8. Charles Sutton

In Large Language Models

  1. Armando Solar-Lezama
  2. Naman Jain
  3. Tianjun Zhang
  4. Ion Stoica

In Evaluation & Benchmarks

  1. Armando Solar-Lezama
  2. Naman Jain
  3. Tianjun Zhang
  4. Ion Stoica

In Safety, Robustness & Interpretability

  1. Armando Solar-Lezama
  2. Ion Stoica
  3. Abhijeet Awasthi

Citations in the corpus