SALLM: Security Assessment of Generated Code

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Siddiq, Mohammed Latif, Santos, Joanna C. S., Devareddy, Sajith, Muller, Anna
Format: Preprint
Publié: 2023
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866910589443375104
author Siddiq, Mohammed Latif
Santos, Joanna C. S.
Devareddy, Sajith
Muller, Anna
author_facet Siddiq, Mohammed Latif
Santos, Joanna C. S.
Devareddy, Sajith
Muller, Anna
contents With the growing popularity of Large Language Models (LLMs) in software engineers' daily practices, it is important to ensure that the code generated by these tools is not only functionally correct but also free of vulnerabilities. Although LLMs can help developers to be more productive, prior empirical studies have shown that LLMs can generate insecure code. There are two contributing factors to the insecure code generation. First, existing datasets used to evaluate LLMs do not adequately represent genuine software engineering tasks sensitive to security. Instead, they are often based on competitive programming challenges or classroom-type coding tasks. In real-world applications, the code produced is integrated into larger codebases, introducing potential security risks. Second, existing evaluation metrics primarily focus on the functional correctness of the generated code while ignoring security considerations. Therefore, in this paper, we described SALLM, a framework to benchmark LLMs' abilities to generate secure code systematically. This framework has three major components: a novel dataset of security-centric Python prompts, configurable assessment techniques to evaluate the generated code, and novel metrics to evaluate the models' performance from the perspective of secure code generation.
format Preprint
id arxiv_https___arxiv_org_abs_2311_00889
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle SALLM: Security Assessment of Generated Code
Siddiq, Mohammed Latif
Santos, Joanna C. S.
Devareddy, Sajith
Muller, Anna
Software Engineering
Artificial Intelligence
With the growing popularity of Large Language Models (LLMs) in software engineers' daily practices, it is important to ensure that the code generated by these tools is not only functionally correct but also free of vulnerabilities. Although LLMs can help developers to be more productive, prior empirical studies have shown that LLMs can generate insecure code. There are two contributing factors to the insecure code generation. First, existing datasets used to evaluate LLMs do not adequately represent genuine software engineering tasks sensitive to security. Instead, they are often based on competitive programming challenges or classroom-type coding tasks. In real-world applications, the code produced is integrated into larger codebases, introducing potential security risks. Second, existing evaluation metrics primarily focus on the functional correctness of the generated code while ignoring security considerations. Therefore, in this paper, we described SALLM, a framework to benchmark LLMs' abilities to generate secure code systematically. This framework has three major components: a novel dataset of security-centric Python prompts, configurable assessment techniques to evaluate the generated code, and novel metrics to evaluate the models' performance from the perspective of secure code generation.
title SALLM: Security Assessment of Generated Code
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2311.00889