Examining Zero-Shot Vulnerability Repair with Large Language Models
Human developers can produce code with cybersecurity bugs. Can emerging 'smart' code completion tools help repair those bugs? In this work, we examine the use of large language models (LLMs) for code (such as OpenAI's Codex and AI21's Jurassic J-1) for zero-shot vulnerability repair. We investigate challenges in the design of prompts that coax LLMs into generating repaired versions of insecure code. This is difficult due to the numerous ways to phrase key information - both semantically and syntactically - with natural languages. We perform a large scale study of five commercially available, black-box, "off-the-shelf" LLMs, as well as an open-source model and our own locally-trained model, on a mix of synthetic, hand-crafted, and real-world security bug scenarios. Our experiments demonstrate that while the approach has promise (the LLMs could collectively repair 100% of our synthetically generated and hand-crafted scenarios), a qualitative evaluation of the model's performance over a corpus of historical real-world examples highlights challenges in generating functionally correct code.
Code (0)
등록된 구현이 없습니다.
Tasks
Code CompletionMethods 이 논문이 사용한 방법론
Similar Papers 제목 키워드 기반
Identifying Helpful Context for LLM-based Vulnerability Repair: A Preliminary Study
Recent advancements in large language models (LLMs) have shown promise for automated vulnerability detection and repair in software systems. This paper investigates the performance of GPT-4o in repairing Java vulnerabili…
Vulnerability DetectionVul-R2: A Reasoning LLM for Automated Vulnerability Repair
The exponential increase in software vulnerabilities has created an urgent need for automatic vulnerability repair (AVR) solutions. Recent research has formulated AVR as a sequence generation problem and has leveraged la…
Reinforcement LearningCode Vulnerability Repair with Large Language Model using Context-Aware Prompt Tuning
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 DetectionRAVEN: Agentic RAG for Automated Vulnerability Repair
Automated vulnerability repair has emerged as a promising direction to mitigate the growing number of software vulnerabilities. Recent advances in Large Language Models (LLMs) have further accelerated research in automat…
CRepair: CVAE-based Automatic Vulnerability Repair Technology
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