paper-with-me

Papers

A Comprehensive Study of LLM Secure Code Generation

2025-03-18 · Shih-Chieh Dai, Jun Xu, Guanhong Tao

LLMs are widely used in software development. However, the code generated by LLMs often contains vulnerabilities. Several secure code generation methods have been proposed to address this issue, but their current evaluation schemes leave several concerns unaddressed. Specifically, most existing studies evaluate security and functional correctness separately, using different datasets. That is, they assess vulnerabilities using security-related code datasets while validating functionality with general code datasets. In addition, prior research primarily relies on a single static analyzer, CodeQL, to detect vulnerabilities in generated code, which limits the scope of security evaluation. In this work, we conduct a comprehensive study to systematically assess the improvements introduced by four state-of-the-art secure code generation techniques. Specifically, we apply both security inspection and functionality validation to the same generated code and evaluate these two aspects together. We also employ three popular static analyzers and two LLMs to identify potential vulnerabilities in the generated code. Our study reveals that existing techniques often compromise the functionality of generated code to enhance security. Their overall performance remains limited when evaluating security and functionality together. In fact, many techniques even degrade the performance of the base LLM. Our further inspection reveals that these techniques often either remove vulnerable lines of code entirely or generate ``garbage code'' that is unrelated to the intended task. Moreover, the commonly used static analyzer CodeQL fails to detect several vulnerabilities, further obscuring the actual security improvements achieved by existing techniques. Our study serves as a guideline for a more rigorous and comprehensive evaluation of secure code generation performance in future work.

📄 PDF Abstract BibTeX arXiv:2503.15554

Code (0)

등록된 구현이 없습니다.

Tasks

Code Generation

Methods 이 논문이 사용한 방법론

BASE 설명 없음

Similar Papers 제목 키워드 기반

SecRepoBench: Benchmarking LLMs for Secure Code Generation in Real-World Repositories

2025-04-29 · Connor Dilgren, Purva Chiniya, Luke Griffith, Yu Ding 외

This paper introduces SecRepoBench, a benchmark to evaluate LLMs on secure code generation in real-world repositories. SecRepoBench has 318 code generation tasks in 27 C/C++ repositories, covering 15 CWEs. We evaluate 19…

BenchmarkingCode GenerationPrompt Engineering

SoK: Understanding (New) Security Issues Across AI4Code Use Cases

2025-12-20 · Qilong Wu, Taoran Li, Tianyang Zhou, Varun Chandrasekaran arxiv

AI-for-Code (AI4Code) systems are reshaping software engineering, with tools like GitHub Copilot accelerating code generation, translation, and vulnerability detection. Alongside these advances, however, security risks r…

Vulnerability DetectionAdversarial RobustnessCode TranslationCode Generation

A Systematic Evaluation of Parameter-Efficient Fine-Tuning Methods for the Security of Code LLMs

2025-09-16 · Kiho Lee, Jungkon Kim, Doowon Kim, Hyoungshick Kim arxiv

Code-generating Large Language Models (LLMs) significantly accelerate software development. However, their frequent generation of insecure code presents serious risks. We present a comprehensive evaluation of seven param…

parameter-efficient fine-tuningCode Generation

Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Models

2023-12-07 · Manish Bhatt, Sahana Chennabasappa, Cyrus Nikolaidis, Shengye Wan 외

This paper presents CyberSecEval, a comprehensive benchmark developed to help bolster the cybersecurity of Large Language Models (LLMs) employed as coding assistants. As what we believe to be the most extensive unified c…

Language ModelingLanguage ModellingLarge Language Model

Is Your AI-Generated Code Really Safe? Evaluating Large Language Models on Secure Code Generation with CodeSecEval

2024-07-02 · Jiexin Wang, Xitong Luo, Liuwen Cao, Hongkui He 외

Large language models (LLMs) have brought significant advancements to code generation and code repair, benefiting both novice and experienced developers. However, their training using unsanitized data from open-source re…

Code GenerationCode Repair