Can LLMs Patch Security Issues?
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have shown impressive proficiency in code generation. Unfortunately, these models share a weakness with their human counterparts: producing code that inadvertently has security vulnerabilities. These vulnerabilities could allow unauthorized attackers to access sensitive data or systems, which is unacceptable for safety-critical applications. In this work, we propose Feedback-Driven Security Patching (FDSP), where LLMs automatically refine generated, vulnerable code. Our approach leverages automatic static code analysis to empower the LLM to generate and implement potential solutions to address vulnerabilities. We address the research communitys needs for safe code generation by introducing a large-scale dataset, PythonSecurityEval, covering the diversity of real-world applications, including databases, websites and operating systems. We empirically validate that FDSP outperforms prior work that uses self-feedback from LLMs by up to 17.6% through our procedure that injects targeted, external feedback. Code and data are available at urlhttps://github.com/Kamel773/LLM-code-refine
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 26 of its 35 references that are in the map. First posted on arXiv 13 Nov 2023.
Builds on
26 of 35 references.
References · 26
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2023Teaching Large Language Models to Self-Debugcited by 988
- 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 783
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 424
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
- 2023Check Your Facts and Try Again: Improving Large Language Models with External Knowledge and Automated Feedbackcited by 353
- 2020Unsupervised Translation of Programming Languagescited by 263
- 2023Using an LLM to Help With Code Understandingcited by 228
14 more
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 197
- 2022Re3: Generating Longer Stories With Recursive Reprompting and Revisioncited by 193
- 2023Software Testing with Large Language Models: Survey, Landscape, and Visioncited by 166
- 2022Multi-lingual Evaluation of Code Generation Modelscited by 159
- 2022DocPrompting: Generating Code by Retrieving the Docscited by 153
- 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 144
- 2023RL4F: Generating Natural Language Feedback with Reinforcement Learning for Repairing Model Outputscited by 105
- 2020Graph-based, Self-Supervised Program Repair from Diagnostic Feedbackcited by 94
- 2023LLMSecEval: A Dataset of Natural Language Prompts for Security Evaluationscited by 62
- 2021Self-Supervised Bug Detection and Repaircited by 59
- 2021NL-EDIT: Correcting semantic parse errors through natural language interactioncited by 33
- 2023Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Reviewcited by 32
- 2023FRANC: A Lightweight Framework for High-Quality Code Generationcited by 14
- 2023Learning Defect Prediction from Unrealistic Datacited by 5
Built on by
Citing papers per year: 2024: 1; 2025: 2.
3 papers.