Can LLMs Patch Security Issues?
Kamel Alrashedy, Abdullah Aljasser, Pradyumna Tambwekar and, Matthew Gombolay

TL;DR
This paper introduces Feedback-Driven Security Patching (FDSP), a method that uses static code analysis and LLMs to automatically identify and fix security vulnerabilities in generated code, improving safety in critical applications.
Contribution
The paper presents FDSP, a novel approach combining static analysis and LLMs for automatic security patching, along with a large dataset for real-world application testing.
Findings
FDSP outperforms prior self-feedback methods by up to 17.6%
Introduces PythonSecurityEval dataset covering diverse real-world applications
Demonstrates effective automatic vulnerability detection and fixing
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Reliability and Analysis Research · Topic Modeling
