paper-with-me

Papers

Code Security Vulnerability Repair Using Reinforcement Learning with Large Language Models

2024-01-13 · Nafis Tanveer Islam, Mohammad Bahrami Karkevandi, Peyman Najafirad

With the recent advancement of Large Language Models (LLMs), generating functionally correct code has become less complicated for a wide array of developers. While using LLMs has sped up the functional development process, it poses a heavy risk to code security. Code generation with proper security measures using LLM is a significantly more challenging task than functional code generation. Security measures may include adding a pair of lines of code with the original code, consisting of null pointer checking or prepared statements for SQL injection prevention. Currently, available code repair LLMs generate code repair by supervised fine-tuning, where the model looks at cross-entropy loss. However, the original and repaired codes are mostly similar in functionality and syntactically, except for a few (1-2) lines, which act as security measures. This imbalance between the lines needed for security measures and the functional code enforces the supervised fine-tuned model to prioritize generating functional code without adding proper security measures, which also benefits the model by resulting in minimal loss. Therefore, in this work, for security hardening and strengthening of generated code from LLMs, we propose a reinforcement learning-based method for program-specific repair with the combination of semantic and syntactic reward mechanisms that focus heavily on adding security and functional measures in the code, respectively.

📄 PDF Abstract BibTeX arXiv:2401.07031

Code (0)

등록된 구현이 없습니다.

Tasks

Code GenerationCode Repairreinforcement-learning

Methods 이 논문이 사용한 방법론

Focus 설명 없음

Similar Papers 제목 키워드 기반

LLM-Powered Code Vulnerability Repair with Reinforcement Learning and Semantic Reward

2024-01-07 · Nafis Tanveer Islam, Joseph Khoury, Andrew Seong, Mohammad Bahrami Karkevandi 외

In software development, the predominant emphasis on functionality often supersedes security concerns, a trend gaining momentum with AI-driven automation tools like GitHub Copilot. These tools significantly improve devel…

Language ModellingLarge Language Modelreinforcement-learning

Can You Really Trust Code Copilots? Evaluating Large Language Models from a Code Security Perspective

2025-05-15 · Yutao Mou, Xiao Deng, Yuxiao Luo, Shikun Zhang 외

Code security and usability are both essential for various coding assistant applications driven by large language models (LLMs). Current code security benchmarks focus solely on single evaluation task and paradigm, such …

Code CompletionCode GenerationVulnerability Detection

How Effective Are Neural Networks for Fixing Security Vulnerabilities

2023-05-29 · Yi Wu, Nan Jiang, Hung Viet Pham, Thibaud Lutellier 외

Security vulnerability repair is a difficult task that is in dire need of automation. Two groups of techniques have shown promise: (1) large code language models (LLMs) that have been pre-trained on source code for tasks…

Code CompletionProgram Repair

CRepair: CVAE-based Automatic Vulnerability Repair Technology

2024-11-08 · Penghui Liu, Yingzhou Bi, Jiangtao Huang, Xinxin Jiang 외

Software vulnerabilities are flaws in computer software systems that pose significant threats to the integrity, security, and reliability of modern software and its application data. These vulnerabilities can lead to sub…

Causal Inference

Code Vulnerability Repair with Large Language Model using Context-Aware Prompt Tuning

2024-09-27 · Arshiya Khan, Guannan Liu, Xing Gao

Large Language Models (LLMs) have shown significant challenges in detecting and repairing vulnerable code, particularly when dealing with vulnerabilities involving multiple aspects, such as variables, code flows, and cod…

Language ModelingLanguage ModellingLarge Language ModelVulnerability Detection