AutoSafeCoder: A Multi-Agent Framework for Securing LLM Code Generation through Static Analysis and Fuzz Testing
On the map: LLM agents and tool use → Agent threats, guardrails and governance
Abstract (arXiv)
Recent advancements in automatic code generation using large language models (LLMs) have brought us closer to fully automated secure software development. However, existing approaches often rely on a single agent for code generation, which struggles to produce secure, vulnerability-free code. Traditional program synthesis with LLMs has primarily focused on functional correctness, often neglecting critical dynamic security implications that happen during runtime. To address these challenges, we propose AutoSafeCoder, a multi-agent framework that leverages LLM-driven agents for code generation, vulnerability analysis, and security enhancement through continuous collaboration. The framework consists of three agents: a Coding Agent responsible for code generation, a Static Analyzer Agent identifying vulnerabilities, and a Fuzzing Agent performing dynamic testing using a mutation-based fuzzing approach to detect runtime errors. Our contribution focuses on ensuring the safety of multi-agent code generation by integrating dynamic and static testing in an iterative process during code generation by LLM that improves security. Experiments using the SecurityEval dataset demonstrate a 13% reduction in code vulnerabilities compared to baseline LLMs, with no compromise in functionality.
Key facts. Cited by 34 papers in the map (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 13 of its 28 references that are in the map. First posted on arXiv 16 Sep 2024.
Builds on
13 of 28 references.
References · 13
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023Large Language Modelscited by 774
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
- 2021Examining Zero-Shot Vulnerability Repair with Large Language Modelscited by 105
- 2022Lost at C: A User Study on the Security Implications of Large Language Model Code Assistantscited by 87
- 2024Self-Organized Agents: A LLM Multi-Agent Framework toward Ultra Large-Scale Code Generation and Optimizationcited by 84
- 2023How Secure is Code Generated by ChatGPT?cited by 77
- 2024An Empirical Study on Usage and Perceptions of LLMs in a Software Engineering Projectcited by 28
- 2023AIBugHunter: A Practical Tool for Predicting, Classifying and Repairing Software Vulnerabilitiescited by 17
1 more
Built on by
Citing papers per year: 2024: 1; 2025: 17; 2026: 16.
34 papers.
Sort:
By area:
- 2026Code as Agent Harnesscited by 40
- 2025Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AIcited by 39
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunitiescited by 26
- 2024Agents4PLC: Automating Closed-loop PLC Code Generation and Verification in Industrial Control Systems using LLM-based Agentscited by 25
- 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Taskscited by 24
- 2025D-CIPHER: Dynamic Collaborative Intelligent Multi-Agent System with Planner and Heterogeneous Executors for Offensive Securitycited by 19
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representationscited by 17
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysiscited by 10
- 2026AgentConductor: Topology Evolution for Multi-Agent Competition-Level Code Generationcited by 9
- 2025RefAgent: A Multi-agent LLM-based Framework for Automatic Software Refactoringcited by 7
- 2025Can You Really Trust Code Copilots? Evaluating Large Language Models from a Code Security Perspectivecited by 6
22 more
- 2025SCGAgent: Recreating the Benefits of Reasoning Models for Secure Code Generation with Agentic Workflowscited by 4
- 2025From Trace to Line: LLM Agent for Real-World OSS Vulnerability Localizationcited by 4
- 2026Clawed and Dangerous: Can We Trust Open Agentic Systems?cited by 3
- 2025RA-Gen: A Controllable Code Generation Framework Using ReAct for Multi-Agent Task Executioncited by 2
- 2025CTIConnect: A Benchmark for Retrieval-Augmented LLMs over Heterogeneous Cyber Threat Intelligencecited by 2
- 2025Helmsman: Autonomous Synthesis of Federated Learning Systems via Collaborative LLM Agentscited by 1
- 2026Feedback-based Automated Verification in Vibe Coding of CAS Adaptation Built on Constraint Logiccited by 1
- 2025Knowledge-Guided Multi-Agent Framework for Application-Level Software Code Generationcited by 0
- 2025Argus: A Multi-Agent Sensitive Information Leakage Detection Framework Based on Hierarchical Reference Relationshipscited by 0
- 2025MALCDF: A Distributed Multi-Agent LLM Framework for Real-Time Cybercited by 0
- 2026AutoEG: Exploiting Known Third-Party Vulnerabilities in Black-Box Web Applicationscited by 0
- 2026A Multi-Agent Framework for Automated Exploit Generation with Constraint-Guided Comprehension and Reflectioncited by 0
- 2026Vibe-Coding: Feedback-Based Automated Verification with no Human Code Inspection, a Feasibility Studycited by 0
- 2026IACDM: Interactive Adversarial Convergence Development Methodology -- A Structured Framework for AI-Assisted Software Developmentcited by 0
- 2026Learn from Your Mistakes: Tree-like Self-Play for Secure Code LLMscited by 0
- 2026Critic-Guided Heterogeneous Multi-Agent Reasoning for Reliable Mathematical Problem Solvingcited by 0
- 2026Security in a Workflow: Exploring Role-Based Agentic Architectures for Vulnerability Handlingcited by 0
- 2026SoK: AI Secure Code Generation: Progress, Pitfalls, and Paths Forwardcited by 0
- 2026The Illusion of Secure LLM Code: Closing the Security Gap via Iterative Repromptingcited by 0
- 2026MACGen: Toward Functionally Correct and Secure Code Generation via Multi-Agent Collaborationcited by 0
- 2026Beyond Static Guarantees: Measuring the Static-Pass Dynamic-Fail Gap in Security-Sensitive and LLM-Generated Python Codecited by 0
- 2026Self-Spec Verifiable Code Generationcited by 0
- 2026Self-Spec Verifiable Code Generation30 Sep 2026
- 2026Beyond Static Guarantees: Measuring the Static-Pass Dynamic-Fail Gap in Security-Sensitive and LLM-Generated Python Code9 Sep 2026
- 2026MACGen: Toward Functionally Correct and Secure Code Generation via Multi-Agent Collaboration26 Aug 2026
- 2026The Illusion of Secure LLM Code: Closing the Security Gap via Iterative Reprompting26 Jul 2026
- 2026SoK: AI Secure Code Generation: Progress, Pitfalls, and Paths Forward23 Jun 2026
- 2026Security in a Workflow: Exploring Role-Based Agentic Architectures for Vulnerability Handling12 Jun 2026
- 2026Critic-Guided Heterogeneous Multi-Agent Reasoning for Reliable Mathematical Problem Solving4 Jun 2026
- 2026Learn from Your Mistakes: Tree-like Self-Play for Secure Code LLMs2 Jun 2026
- 2026Code as Agent Harness18 May 2026
- 2026Vibe-Coding: Feedback-Based Automated Verification with no Human Code Inspection, a Feasibility Study16 Apr 2026
- 2026A Multi-Agent Framework for Automated Exploit Generation with Constraint-Guided Comprehension and Reflection6 Apr 2026
- 2026AutoEG: Exploiting Known Third-Party Vulnerabilities in Black-Box Web Applications1 Apr 2026
22 more
- 2026IACDM: Interactive Adversarial Convergence Development Methodology -- A Structured Framework for AI-Assisted Software Development31 Mar 2026
- 2026Clawed and Dangerous: Can We Trust Open Agentic Systems?27 Mar 2026
- 2026Feedback-based Automated Verification in Vibe Coding of CAS Adaptation Built on Constraint Logic20 Feb 2026
- 2026AgentConductor: Topology Evolution for Multi-Agent Competition-Level Code Generation19 Feb 2026
- 2025MALCDF: A Distributed Multi-Agent LLM Framework for Real-Time Cyber16 Dec 2025
- 2025Argus: A Multi-Agent Sensitive Information Leakage Detection Framework Based on Hierarchical Reference Relationships9 Dec 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025RefAgent: A Multi-agent LLM-based Framework for Automatic Software Refactoring5 Nov 2025
- 2025Knowledge-Guided Multi-Agent Framework for Application-Level Software Code Generation22 Oct 2025
- 2025Helmsman: Autonomous Synthesis of Federated Learning Systems via Collaborative LLM Agents16 Oct 2025
- 2025CTIConnect: A Benchmark for Retrieval-Augmented LLMs over Heterogeneous Cyber Threat Intelligence13 Oct 2025
- 2025RA-Gen: A Controllable Code Generation Framework Using ReAct for Multi-Agent Task Execution9 Oct 2025
- 2025From Trace to Line: LLM Agent for Real-World OSS Vulnerability Localization30 Sep 2025
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunities15 Aug 2025
- 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Tasks3 Jul 2025
- 2025SCGAgent: Recreating the Benefits of Reasoning Models for Secure Code Generation with Agentic Workflows8 Jun 2025
- 2025Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AI26 May 2025
- 2025Can You Really Trust Code Copilots? Evaluating Large Language Models from a Code Security Perspective15 May 2025
- 2025D-CIPHER: Dynamic Collaborative Intelligent Multi-Agent System with Planner and Heterogeneous Executors for Offensive Security15 Feb 2025
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysis5 Feb 2025
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representations22 Jan 2025
- 2024Agents4PLC: Automating Closed-loop PLC Code Generation and Verification in Industrial Control Systems using LLM-based Agents18 Oct 2024
- 2026Code as Agent Harnesscited by 40
- 2025Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AIcited by 39
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunitiescited by 26
- 2024Agents4PLC: Automating Closed-loop PLC Code Generation and Verification in Industrial Control Systems using LLM-based Agentscited by 25
- 2025D-CIPHER: Dynamic Collaborative Intelligent Multi-Agent System with Planner and Heterogeneous Executors for Offensive Securitycited by 19
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2026AgentConductor: Topology Evolution for Multi-Agent Competition-Level Code Generationcited by 9
- 2025RefAgent: A Multi-agent LLM-based Framework for Automatic Software Refactoringcited by 7
- 2025SCGAgent: Recreating the Benefits of Reasoning Models for Secure Code Generation with Agentic Workflowscited by 4
- 2025From Trace to Line: LLM Agent for Real-World OSS Vulnerability Localizationcited by 4
- 2026Clawed and Dangerous: Can We Trust Open Agentic Systems?cited by 3
- 2025RA-Gen: A Controllable Code Generation Framework Using ReAct for Multi-Agent Task Executioncited by 2
12 most cited of 20 All 20 (JSON)
- 2026MACGen: Toward Functionally Correct and Secure Code Generation via Multi-Agent Collaboration26 Aug 2026
- 2026SoK: AI Secure Code Generation: Progress, Pitfalls, and Paths Forward23 Jun 2026
- 2026Security in a Workflow: Exploring Role-Based Agentic Architectures for Vulnerability Handling12 Jun 2026
- 2026Code as Agent Harness18 May 2026
- 2026A Multi-Agent Framework for Automated Exploit Generation with Constraint-Guided Comprehension and Reflection6 Apr 2026
- 2026Clawed and Dangerous: Can We Trust Open Agentic Systems?27 Mar 2026
- 2026AgentConductor: Topology Evolution for Multi-Agent Competition-Level Code Generation19 Feb 2026
- 2025MALCDF: A Distributed Multi-Agent LLM Framework for Real-Time Cyber16 Dec 2025
- 2025Argus: A Multi-Agent Sensitive Information Leakage Detection Framework Based on Hierarchical Reference Relationships9 Dec 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025RefAgent: A Multi-agent LLM-based Framework for Automatic Software Refactoring5 Nov 2025
- 2025Knowledge-Guided Multi-Agent Framework for Application-Level Software Code Generation22 Oct 2025
12 newest of 20 All 20 (JSON)
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representationscited by 17
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysiscited by 10
- 2025Can You Really Trust Code Copilots? Evaluating Large Language Models from a Code Security Perspectivecited by 6
- 2026Feedback-based Automated Verification in Vibe Coding of CAS Adaptation Built on Constraint Logiccited by 1
- 2026AutoEG: Exploiting Known Third-Party Vulnerabilities in Black-Box Web Applicationscited by 0
- 2026Vibe-Coding: Feedback-Based Automated Verification with no Human Code Inspection, a Feasibility Studycited by 0
- 2026IACDM: Interactive Adversarial Convergence Development Methodology -- A Structured Framework for AI-Assisted Software Developmentcited by 0
- 2026The Illusion of Secure LLM Code: Closing the Security Gap via Iterative Repromptingcited by 0
- 2026Beyond Static Guarantees: Measuring the Static-Pass Dynamic-Fail Gap in Security-Sensitive and LLM-Generated Python Codecited by 0
- 2026Self-Spec Verifiable Code Generationcited by 0
- 2026Self-Spec Verifiable Code Generation30 Sep 2026
- 2026Beyond Static Guarantees: Measuring the Static-Pass Dynamic-Fail Gap in Security-Sensitive and LLM-Generated Python Code9 Sep 2026
- 2026The Illusion of Secure LLM Code: Closing the Security Gap via Iterative Reprompting26 Jul 2026
- 2026Vibe-Coding: Feedback-Based Automated Verification with no Human Code Inspection, a Feasibility Study16 Apr 2026
- 2026AutoEG: Exploiting Known Third-Party Vulnerabilities in Black-Box Web Applications1 Apr 2026
- 2026IACDM: Interactive Adversarial Convergence Development Methodology -- A Structured Framework for AI-Assisted Software Development31 Mar 2026
- 2026Feedback-based Automated Verification in Vibe Coding of CAS Adaptation Built on Constraint Logic20 Feb 2026
- 2025Can You Really Trust Code Copilots? Evaluating Large Language Models from a Code Security Perspective15 May 2025
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysis5 Feb 2025
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representations22 Jan 2025
Similar, not cited
Close in wording, no citation either way
- 2026FuzzingBrain V2: A Multi-Agent LLM System for Automated Vulnerability Discovery and Reproduction
- 2025SEC-bench: Automated Benchmarking of LLM Agents on Real-World Software Security Tasks
- 2025TypePilot: Leveraging the Scala Type System for Secure LLM-generated Code
- 2026When Passing Tests Hides Vulnerabilities: An Empirical Study of Silent Failures in Agentic Systems
- 2025Analyzing Code Injection Attacks on LLM-based Multi-Agent Systems in Software Development
- 2026SecureForge: Finding and Preventing Vulnerabilities in LLM-Generated Code via Prompt Optimization
- 2025LLM Agents for Automated Web Vulnerability Reproduction: Are We There Yet?
- 2025How Safe Are AI-Generated Patches? A Large-scale Study on Security Risks in LLM and Agentic Automated Program Repair on SWE-bench