SecureFixAgent: A Hybrid LLM Agent for Automated Python Static Vulnerability Repair

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Gajjar, Jugal, Subramaniakuppusamy, Kamalasankari, Puthal, Relsy, Ranaware, Kaustik
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909798324240384
author Gajjar, Jugal
Subramaniakuppusamy, Kamalasankari
Puthal, Relsy
Ranaware, Kaustik
author_facet Gajjar, Jugal
Subramaniakuppusamy, Kamalasankari
Puthal, Relsy
Ranaware, Kaustik
contents Modern software development pipelines face growing challenges in securing large codebases with extensive dependencies. Static analysis tools like Bandit are effective at vulnerability detection but suffer from high false positives and lack repair capabilities. Large Language Models (LLMs), in contrast, can suggest fixes but often hallucinate changes and lack self-validation. We present SecureFixAgent, a hybrid repair framework integrating Bandit with lightweight local LLMs (<8B parameters) in an iterative detect-repair-validate loop. To improve precision, we apply parameter-efficient LoRA-based fine-tuning on a diverse, curated dataset spanning multiple Python project domains, mitigating dataset bias and reducing unnecessary edits. SecureFixAgent uses Bandit for detection, the LLM for candidate fixes with explanations, and Bandit re-validation for verification, all executed locally to preserve privacy and reduce cloud reliance. Experiments show SecureFixAgent reduces false positives by 10.8% over static analysis, improves fix accuracy by 13.51%, and lowers false positives by 5.46% compared to pre-trained LLMs, typically converging within three iterations. Beyond metrics, developer studies rate explanation quality 4.5/5, highlighting its value for human trust and adoption. By combining verifiable security improvements with transparent rationale in a resource-efficient local framework, SecureFixAgent advances trustworthy, automated vulnerability remediation for modern pipelines.
format Preprint
id arxiv_https___arxiv_org_abs_2509_16275
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle SecureFixAgent: A Hybrid LLM Agent for Automated Python Static Vulnerability Repair
Gajjar, Jugal
Subramaniakuppusamy, Kamalasankari
Puthal, Relsy
Ranaware, Kaustik
Cryptography and Security
Artificial Intelligence
Software Engineering
Modern software development pipelines face growing challenges in securing large codebases with extensive dependencies. Static analysis tools like Bandit are effective at vulnerability detection but suffer from high false positives and lack repair capabilities. Large Language Models (LLMs), in contrast, can suggest fixes but often hallucinate changes and lack self-validation. We present SecureFixAgent, a hybrid repair framework integrating Bandit with lightweight local LLMs (<8B parameters) in an iterative detect-repair-validate loop. To improve precision, we apply parameter-efficient LoRA-based fine-tuning on a diverse, curated dataset spanning multiple Python project domains, mitigating dataset bias and reducing unnecessary edits. SecureFixAgent uses Bandit for detection, the LLM for candidate fixes with explanations, and Bandit re-validation for verification, all executed locally to preserve privacy and reduce cloud reliance. Experiments show SecureFixAgent reduces false positives by 10.8% over static analysis, improves fix accuracy by 13.51%, and lowers false positives by 5.46% compared to pre-trained LLMs, typically converging within three iterations. Beyond metrics, developer studies rate explanation quality 4.5/5, highlighting its value for human trust and adoption. By combining verifiable security improvements with transparent rationale in a resource-efficient local framework, SecureFixAgent advances trustworthy, automated vulnerability remediation for modern pipelines.
title SecureFixAgent: A Hybrid LLM Agent for Automated Python Static Vulnerability Repair
topic Cryptography and Security
Artificial Intelligence
Software Engineering
url https://arxiv.org/abs/2509.16275