mlsanityData to 14 Oct 2026

RedCodeAgent: Automatic Red-teaming Agent against Diverse Code Agents

arXiv 2510.02609 ↗First posted 2 Oct 2025cs.SEcited by 9

On the map: LLM agents and tool use → Agent threats, guardrails and governance

also in 1 more
Abstract (arXiv)

Code agents have gained widespread adoption due to their strong code generation capabilities and integration with code interpreters, enabling dynamic execution, debugging, and interactive programming capabilities. While these advancements have streamlined complex workflows, they have also introduced critical safety and security risks. Current static safety benchmarks and red-teaming tools are inadequate for identifying emerging real-world risky scenarios, as they fail to cover certain boundary conditions, such as the combined effects of different jailbreak tools. In this work, we propose RedCodeAgent, the first automated red-teaming agent designed to systematically uncover vulnerabilities in diverse code agents. With an adaptive memory module, RedCodeAgent can leverage existing jailbreak knowledge, dynamically select the most effective red-teaming tools and tool combinations in a tailored toolbox for a given input query, thus identifying vulnerabilities that might otherwise be overlooked. For reliable evaluation, we develop simulated sandbox environments to additionally evaluate the execution results of code agents, mitigating potential biases of LLM-based judges that only rely on static code. Through extensive evaluations across multiple state-of-the-art code agents, diverse risky scenarios, and various programming languages, RedCodeAgent consistently outperforms existing red-teaming methods, achieving higher attack success rates and lower rejection rates with high efficiency. We further validate RedCodeAgent on real-world code assistants, e.g., Cursor and Codeium, exposing previously unidentified security risks. By automating and optimizing red-teaming processes, RedCodeAgent enables scalable, adaptive, and effective safety assessments of code agents.

Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 39 of its 48 references that are in the map. First posted on arXiv 2 Oct 2025.

Builds on

39 of 48 references.

Closest ancestors · 9

Same direction, newest first

  1. 2025RedTeamCUA: Realistic Adversarial Testing of Computer-Use Agents in Hybrid Web-OS Environments28 May
  2. 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents3 Oct
  3. 2024EIA: Environmental Injection Attack on Generalist Web Agents for Privacy Leakage17 Sep
  4. 2024RedAgent: Red Teaming Large Language Models with Context-aware Autonomous Language Agent23 Jul
  5. 2024AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Bases17 Jul
  6. 2024LLM Agents can Autonomously Exploit One-day Vulnerabilities11 Apr
  7. 2024R-Judge: Benchmarking Safety Risk Awareness for LLM Agents18 Jan
  8. 2023Testing Language Model Agents Safely in the Wild17 Nov
  9. 2023Identifying the Risks of LM Agents with an LM-Emulated Sandbox25 Sep

Other references · 30

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  3. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  4. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  6. 2023Qwen Technical Reportcited by 3,344
  7. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  8. 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,808
  9. 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,439
  10. 2023AgentBench: Evaluating LLMs as Agentscited by 1,267
  11. 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 785
  12. 2024Executable Code Actions Elicit Better LLM Agentscited by 564
18 more
  1. 2023GPTFUZZER: Red Teaming Large Language Models with Auto-Generated Jailbreak Promptscited by 560
  2. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 431
  3. 2023Formalizing and Benchmarking Prompt Injection Attacks and Defensescited by 364
  4. 2024OpenCodeInterpreter: Integrating Code Generation with Execution and Refinementcited by 247
  5. 2024Jailbreak Attacks and Defenses Against Large Language Models: A Surveycited by 230
  6. 2024AmpleGCG: Learning a Universal and Transferable Generative Model of Adversarial Suffixes for Jailbreaking Both Open and Closed LLMscited by 172
  7. 2024AdvPrompter: Fast Adaptive Adversarial Prompting for LLMscited by 156
  8. 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 155
  9. 2023Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Modelscited by 138
  10. 2024CyberSecEval 2: A Wide-Ranging Cybersecurity Evaluation Suite for Large Language Modelscited by 89
  11. 2024JailbreakZoo: Survey, Landscapes, and Horizons in Jailbreaking Large Language and Vision-Language Modelscited by 70
  12. 2023TrojanPuzzle: Covertly Poisoning Code-Suggestion Modelscited by 60
  13. 2025CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generationcited by 59
  14. 2023CodeLMSec Benchmark: Systematically Evaluating and Finding Security Vulnerabilities in Black-Box Code Language Modelscited by 55
  15. 2022CodeAttack: Code-Based Adversarial Attacks for Pre-trained Programming Language Modelscited by 53
  16. 2024HAICOSYSTEM: An Ecosystem for Sandboxing Safety Risks in Human-AI Interactionscited by 44
  17. 2023Vulnerabilities in AI Code Generators: Exploring Targeted Data Poisoning Attackscited by 33
  18. 2024RMCBench: Benchmarking Large Language Models' Resistance to Malicious Codecited by 28

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 7.

9 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024RedCode: Risky Code Execution and Generation Benchmark for Code Agents
  2. 2025Red-Teaming Coding Agents from a Tool-Invocation Perspective: An Empirical Security Assessment
  3. 2025BlueCodeAgent: A Blue Teaming Agent Enabled by Automated Red Teaming for CodeGen AI
  4. 2026Execution-Grounded Security Testing for Coding Agents in Software Engineering Pipelines
  5. 2025RedCoder: Automated Multi-Turn Red Teaming for Code LLMs
  6. 2026MonitoringBench: Semi-Automated Red-Teaming for Agent Monitoring
  7. 2026REDAgentBench: Executable Red Teaming and Faithful Measurement of LLM Agent Systems
  8. 2026Agent Hacks Agent: Autoresearch for Production-Agent Red-Teaming