mlsanityData to 7 Oct 2026

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

arXiv 2409.18395 ↗First posted 27 Sep 2024cs.CR cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

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 code structures. In this study, we utilize GitHub Copilot as the LLM and focus on buffer overflow vulnerabilities. Our experiments reveal a notable gap in Copilot's abilities when dealing with buffer overflow vulnerabilities, with a 76% vulnerability detection rate but only a 15% vulnerability repair rate. To address this issue, we propose context-aware prompt tuning techniques designed to enhance LLM performance in repairing buffer overflow. By injecting a sequence of domain knowledge about the vulnerability, including various security and code contexts, we demonstrate that Copilot's successful repair rate increases to 63%, representing more than four times the improvement compared to repairs without domain knowledge.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 21 of its 34 references that are in the map. First posted on arXiv 27 Sep 2024.

Builds on

21 of 34 references.

References · 21

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  4. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
  5. 2023SneakyPrompt: Jailbreaking Text-to-image Generative Modelscited by 175
  6. 2023Structured Chain-of-Thought Prompting for Code Generationcited by 136
  7. 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 133
  8. 2024PLeak: Prompt Leaking Attacks against Large Language Model Applicationscited by 113
  9. 2024Beyond Functional Correctness: Exploring Hallucinations in LLM-Generated Codecited by 106
  10. 2021Examining Zero-Shot Vulnerability Repair with Large Language Modelscited by 105
  11. 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 98
  12. 2023LLMs Cannot Reliably Identify and Reason About Security Vulnerabilities (Yet?): A Comprehensive Evaluation, Framework, and Benchmarkscited by 94
9 more
  1. 2023How Effective Are Neural Networks for Fixing Security Vulnerabilitiescited by 50
  2. 2023TrojanPuzzle: Covertly Poisoning Code-Suggestion Modelscited by 47
  3. 2023Large Language Models for Code Analysis: Do LLMs Really Do Their Job?cited by 44
  4. 2024A Deep Dive into Large Language Models for Automated Bug Localization and Repaircited by 39
  5. 2022CCTEST: Testing and Repairing Code Completion Systemscited by 35
  6. 2024An LLM-Assisted Easy-to-Trigger Backdoor Attack on Code Completion Models: Injecting Disguised Vulnerabilities against Strong Detectioncited by 32
  7. 2024Malla: Demystifying Real-world Large Language Model Integrated Malicious Servicescited by 24
  8. 2023Domain Knowledge Matters: Improving Prompts with Fix Templates for Repairing Python Type Errorscited by 22
  9. 2024Moderating Illicit Online Image Promotion for Unsafe User-Generated Content Games Using Large Vision-Language Modelscited by 13

Built on by

Cited by year

Citing papers per year: 2024: 1; 2025: 1.

2 papers.