Your AI Assistant Ships Insecure Code Almost Half the Time. Catching It in Review Is Too Late.
By Sangyeon Park — creator of Cencurity , an open-source security gateway for LLM coding agents In March 2026, Veracode published its Spring GenAI Code Security Update. The team ran more than 150 large language models through 80 code-generation tasks in Java, JavaScript, C#, and Python, then tested every output against four common weakness categories. The syntax was excellent. Over 95% of the…
In March 2026, Veracode conducted a study on the security of code generated by large language models (LLMs). Out of 150 tasks across Java, JavaScript, C#, and Python, 45% of the generated code contained known vulnerabilities. The security pass rate remained stubbornly at approximately 55%, unchanged for two years despite improvements in context windows, reasoning, and benchmark scores.
The failures were not evenly distributed; weak areas like insecure crypto, SQL injection, cross-site scripting, and log injection showed varying pass rates. The root cause lies in the training data used for the models. Stanford researchers found that developers using AI assistants wrote less secure code and had higher confidence in their work, even though the assistant-generated code was more vulnerable.
This compounded effect highlights the need for skepticism and active rewriting of prompts. However, focusing solely on the generated code overlooks the broader issue that the AI agent also interacts with the development environment, sending code, environment values, and potentially sensitive credentials. This creates additional failure modes like prompt injection, unsafe tool calls, data leakage, and actions taken without trace.
Traditional application security tools like SAST, DAST, and IAST are ineffective in this context, as they rely on code existing at rest. The solution proposed is a local security gateway, Cencurity, that binds to the local loopback and intercepts outbound requests from the agent, redacting sensitive information before they leave the machine.
Inbound responses are inspected for dangerous constructs, and everything happens on the stream, ensuring enforcement occurs while the model is still producing tokens. This approach, known as CAST or Code-Aware Security Transformation, aims to address the security gap created by AI agents in the development loop.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.