🤖 AI Summary
Prior work lacks systematic security evaluation of large language model (LLM)-based programming agents in real-world software development. Method: We propose the first security assessment framework tailored for programming agents, conducting high-precision vulnerability detection on over 12,000 operations generated by five mainstream models—including GPT-4o and Claude series—across 93 realistic development tasks. Contribution/Results: We identify four prevalent unsafe behavioral patterns; 21% of execution traces contain security vulnerabilities, with information disclosure (CWE-200) being the most frequent. We further evaluate mitigation strategies—such as feedback mechanisms and safety prompts—and demonstrate that GPT-4.1 achieves a 96.8% vulnerability mitigation success rate. Our study delivers a reproducible methodology and empirical evidence to inform the secure deployment and governance of LLM-powered programming agents.
📝 Abstract
LLM-based coding agents are rapidly being deployed in software development, yet their security implications remain poorly understood. These agents, while capable of accelerating software development, may inadvertently introduce insecure practices. We conducted the first systematic security evaluation of autonomous coding agents, analyzing over 12,000 actions across five state-of-the-art models (GPT-4o, GPT-4.1, Claude variants) on 93 real-world software setup tasks. Our findings reveal significant security concerns: 21% of agent trajectories contained insecure actions, with models showing substantial variation in security behavior. We developed a high-precision detection system that identified four major vulnerability categories, with information exposure (CWE-200) being the most prevalent one. We also evaluated mitigation strategies including feedback mechanisms and security reminders with various effectiveness between models. GPT-4.1 demonstrated exceptional security awareness with 96.8% mitigation success. Our work provides the first comprehensive framework for evaluating coding agent security and highlights the need for security-aware design of next generation LLM-based coding agents.