paper-with-me

Papers

Enhancing Source Code Security with LLMs: Demystifying The Challenges and Generating Reliable Repairs

2024-09-01 · Nafis Tanveer Islam, Joseph Khoury, Andrew Seong, Elias Bou-Harb, Peyman Najafirad

With the recent unprecedented advancements in Artificial Intelligence (AI) computing, progress in Large Language Models (LLMs) is accelerating rapidly, presenting challenges in establishing clear guidelines, particularly in the field of security. That being said, we thoroughly identify and describe three main technical challenges in the security and software engineering literature that spans the entire LLM workflow, namely; \textbf{\textit{(i)}} Data Collection and Labeling; \textbf{\textit{(ii)}} System Design and Learning; and \textbf{\textit{(iii)}} Performance Evaluation. Building upon these challenges, this paper introduces \texttt{SecRepair}, an instruction-based LLM system designed to reliably \textit{identify}, \textit{describe}, and automatically \textit{repair} vulnerable source code. Our system is accompanied by a list of actionable guides on \textbf{\textit{(i)}} Data Preparation and Augmentation Techniques; \textbf{\textit{(ii)}} Selecting and Adapting state-of-the-art LLM Models; \textbf{\textit{(iii)}} Evaluation Procedures. \texttt{SecRepair} uses a reinforcement learning-based fine-tuning with a semantic reward that caters to the functionality and security aspects of the generated code. Our empirical analysis shows that \texttt{SecRepair} achieves a \textit{12}\% improvement in security code repair compared to other LLMs when trained using reinforcement learning. Furthermore, we demonstrate the capabilities of \texttt{SecRepair} in generating reliable, functional, and compilable security code repairs against real-world test cases using automated evaluation metrics.

📄 PDF Abstract BibTeX arXiv:2409.00571

Code (0)

등록된 구현이 없습니다.

Tasks

Code Repair

Similar Papers 제목 키워드 기반

Enhancing Large Language Models for Secure Code Generation: A Dataset-driven Study on Vulnerability Mitigation

2023-10-25 · Jiexin Wang, Liuwen Cao, Xitong Luo, Zhiping Zhou 외

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

Code GenerationCode Repair

AI Safety vs. AI Security: Demystifying the Distinction and Boundaries

2025-06-21 · Zhiqiang Lin, Huan Sun, Ness Shroff

Artificial Intelligence (AI) is rapidly being integrated into critical systems across various domains, from healthcare to autonomous vehicles. While its integration brings immense benefits, it also introduces significant…

Autonomous Vehicles

CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generation

2025-01-14 · Jinjun Peng, Leyi Cui, Kele Huang, Junfeng Yang 외

Large Language Models (LLMs) have significantly aided developers by generating or assisting in code writing, enhancing productivity across various tasks. While identifying incorrect code is often straightforward, detecti…

Code Generation

LLaVul: A Multimodal LLM for Interpretable Vulnerability Reasoning about Source Code

2025-09-22 · Ala Jararweh, Michael Adams, Avinash Sahu, Abdullah Mueen 외 arxiv

Increasing complexity in software systems places a growing demand on reasoning tools that unlock vulnerabilities manifest in source code. Many current approaches focus on vulnerability analysis as a classifying task, ove…

Code Copycat Conundrum: Demystifying Repetition in LLM-based Code Generation

2025-04-17 · Mingwei Liu, Juntao Li, Ying Wang, Xueying Du 외

Despite recent advances in Large Language Models (LLMs) for code generation, the quality of LLM-generated code still faces significant challenges. One significant issue is code repetition, which refers to the model's ten…

Code Generation