The FormAI Dataset: Generative AI in Software Security Through the Lens of Formal Verification

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Tihanyi, Norbert, Bisztray, Tamas, Jain, Ridhi, Ferrag, Mohamed Amine, Cordeiro, Lucas C., Mavroeidis, Vasileios
Format: Preprint
Publié: 2023
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866911817224159232
author Tihanyi, Norbert
Bisztray, Tamas
Jain, Ridhi
Ferrag, Mohamed Amine
Cordeiro, Lucas C.
Mavroeidis, Vasileios
author_facet Tihanyi, Norbert
Bisztray, Tamas
Jain, Ridhi
Ferrag, Mohamed Amine
Cordeiro, Lucas C.
Mavroeidis, Vasileios
contents This paper presents the FormAI dataset, a large collection of 112, 000 AI-generated compilable and independent C programs with vulnerability classification. We introduce a dynamic zero-shot prompting technique constructed to spawn diverse programs utilizing Large Language Models (LLMs). The dataset is generated by GPT-3.5-turbo and comprises programs with varying levels of complexity. Some programs handle complicated tasks like network management, table games, or encryption, while others deal with simpler tasks like string manipulation. Every program is labeled with the vulnerabilities found within the source code, indicating the type, line number, and vulnerable function name. This is accomplished by employing a formal verification method using the Efficient SMT-based Bounded Model Checker (ESBMC), which uses model checking, abstract interpretation, constraint programming, and satisfiability modulo theories to reason over safety/security properties in programs. This approach definitively detects vulnerabilities and offers a formal model known as a counterexample, thus eliminating the possibility of generating false positive reports. We have associated the identified vulnerabilities with Common Weakness Enumeration (CWE) numbers. We make the source code available for the 112, 000 programs, accompanied by a separate file containing the vulnerabilities detected in each program, making the dataset ideal for training LLMs and machine learning algorithms. Our study unveiled that according to ESBMC, 51.24% of the programs generated by GPT-3.5 contained vulnerabilities, thereby presenting considerable risks to software safety and security.
format Preprint
id arxiv_https___arxiv_org_abs_2307_02192
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle The FormAI Dataset: Generative AI in Software Security Through the Lens of Formal Verification
Tihanyi, Norbert
Bisztray, Tamas
Jain, Ridhi
Ferrag, Mohamed Amine
Cordeiro, Lucas C.
Mavroeidis, Vasileios
Databases
Artificial Intelligence
This paper presents the FormAI dataset, a large collection of 112, 000 AI-generated compilable and independent C programs with vulnerability classification. We introduce a dynamic zero-shot prompting technique constructed to spawn diverse programs utilizing Large Language Models (LLMs). The dataset is generated by GPT-3.5-turbo and comprises programs with varying levels of complexity. Some programs handle complicated tasks like network management, table games, or encryption, while others deal with simpler tasks like string manipulation. Every program is labeled with the vulnerabilities found within the source code, indicating the type, line number, and vulnerable function name. This is accomplished by employing a formal verification method using the Efficient SMT-based Bounded Model Checker (ESBMC), which uses model checking, abstract interpretation, constraint programming, and satisfiability modulo theories to reason over safety/security properties in programs. This approach definitively detects vulnerabilities and offers a formal model known as a counterexample, thus eliminating the possibility of generating false positive reports. We have associated the identified vulnerabilities with Common Weakness Enumeration (CWE) numbers. We make the source code available for the 112, 000 programs, accompanied by a separate file containing the vulnerabilities detected in each program, making the dataset ideal for training LLMs and machine learning algorithms. Our study unveiled that according to ESBMC, 51.24% of the programs generated by GPT-3.5 contained vulnerabilities, thereby presenting considerable risks to software safety and security.
title The FormAI Dataset: Generative AI in Software Security Through the Lens of Formal Verification
topic Databases
Artificial Intelligence
url https://arxiv.org/abs/2307.02192