Mostly not, unless you check. In an October 2026 benchmark of six frontier models, 73.6–91.3% of tasks produced working code, but only 16.4–25.1% produced code that was both working and secure. Treat agent output like code from a fast junior developer: scan it, test it, sandbox it, and have a person review every merge.
Updated 13 November 2026. Several primary studies on coding agent security came out in October 2026. They point the same way: agents ship features reliably and security unreliably, and the agent tooling itself is now an attack surface. This post summarises what the papers actually measured, from their arXiv abstracts and full text, and turns it into controls you can put in your pipeline this quarter. For which tools to evaluate, see our Cursor vs Claude Code vs Codex vs Devin comparison.
Not by default. Agents now produce code that passes functional tests most of the time, but security has not improved at the same rate. Two independent sources agree. A new academic benchmark puts the best model at 25.1% "functional and secure". Veracode's long-running test puts the average secure pass rate around 55%, roughly flat since 2023.
The two numbers differ because they measure different things. Veracode's Spring 2026 update gives single-function tasks across four CWE types and scans the output with SAST. It found "only 55% of generation tasks result in secure code", while syntax correctness rose from about 50% to 95% since 2023. LSCBench, below, uses real vulnerabilities in real projects, at function, file and whole-repository scope, and grades with hidden exploit tests. It is a harder and more realistic bar.
"Last Secure Code Benchmark: Is the Code You Vibe Secure?" (arXiv 2610.14766, submitted 10 October 2026) tested six frontier models on 450 tasks. The tasks were built from 150 real vulnerabilities across seven languages and 24 CWE categories. The best model produced functional, secure code on 25.1% of tasks. Only 19 tasks were secured by all six models.
The prompts asked only for working features and never mentioned security, which is how most people use agents. Hidden functional and security tests graded the results.
| Model | Functional pass | Functional and secure | Secure at all 3 scopes (per scenario) |
|---|---|---|---|
| Claude Fable 5 | 91.1% | 25.1% | 12.0% |
| GPT-5.6 Sol | 89.1% | 24.7% | 8.0% |
| Qwen3.8-Max | 89.3% | 22.0% | 8.0% |
| GLM-5.3 | 87.1% | 21.3% | 7.3% |
| DeepSeek-V4-Pro | 73.6% | 18.0% | 6.7% |
| Kimi-K3 | 91.3% | 16.4% | 2.0% |
Source: LSCBench full text, Table 10. Three findings matter for engineering leaders:
Note that these are the models from August and September 2026. Newer releases such as Claude Fable 5.2 and Kimi K3.1 Pro were not tested. We cover those in our open-weight coding models guide and the November agent update.

Web-facing data flow bugs. In LSCBench, information exposure (CWE-200) was secured in only 0.7% of attempts, server-side request forgery (CWE-918) in 2.4%, and code injection (CWE-94) in 4.9%. Memory safety was the easiest category, at 34.3%. Veracode reports the same pattern: cross-site scripting at 15% and log injection at 13%, against 82% for SQL injection.
That pattern makes sense. SQL injection and memory bugs have well-known local fixes that models have seen millions of times. Information exposure, SSRF and injection depend on context the model does not see: what is sensitive, which hosts are internal, where input comes from. Add that context to the agent's instructions and to your review checklist. By language, LSCBench found C, Python and JavaScript secured most often (27–30% of tasks), and Java, Go and PHP least (10–18%). The authors attribute much of that gap to which weakness types each language's tasks contained.
Somewhat, but nowhere near enough. In LSCBench, adding one sentence asking for secure code raised the functional-and-secure rate by 21.5 points for GPT-5.6 Sol (to 46.2%), 16.9 points for GLM-5.3 (to 38.2%) and 15.6 for Qwen3.8-Max (to 37.6%). DeepSeek-V4-Pro gained only 1.1 points. Most tasks stayed insecure even with the reminder.
So do it. Put security requirements in your AGENTS.md or CLAUDE.md, and be specific: "never build URLs from user input without an allow-list", "never log request bodies". It is free and it helps. But it is a nudge, not a control. The controls come later in this post.
Yes. October's research shows two concrete paths: weak harness settings, and poisoned instruction files. The biggest single risk is auto-approve. In one benchmark, turning it on raised attack success from 29.2% to 95.6%.
HarnessSecurity-Bench (arXiv 2610.07639) tested nine security mechanisms across six harnesses: Claude Code, Codex CLI, Gemini CLI, gptme, Qwen Code and GitHub Copilot. It ran 2,500 trials with the same baseline model. Key results:
"Security Impact of Coding Agent's Memory Files" (arXiv 2610.38521) planted malicious CLAUDE.md-style files that framed removing defensive checks as best practice. They tested Claude Code and OpenCode on 36 tasks. Secure-completion rates moved between −8 and +6 points with no consistent pattern. That is a small sample, as the authors say. Disclosure differed: Claude Code named the file in about two-thirds of its final messages, while OpenCode mentioned it almost only in its reasoning trace, which developers rarely read. Practical rule: treat changes to AGENTS.md, CLAUDE.md, skills and MCP configs like changes to CI config. Require CODEOWNERS review.

Better than they avoid them. CWE-bench (arXiv 2610.17020) gave agents 250 real repositories to audit and repair, without saying where the bug was or what kind it was. The best agent fixed 67% at the first attempt and 79% within four attempts. A deterministic verifier checked that each patch blocked the exploit and kept functionality.
This is the useful flip side. The same class of model that writes a vulnerable endpoint can often find and fix it when asked to look. So run a separate, security-focused review pass, by a different agent or a different prompt, plus SAST. That catches much of what the writing pass missed. GitHub has built this into its cloud agent, as the next section shows.
Layer five controls: static analysis in the loop, secret scanning, a dependency policy, sandboxed execution, and human review that the agent cannot bypass. No single one is enough. Together they move agent output from "probably insecure" to "reviewed like any other change".
blockWritesOutsideWorkingDirectories and denyInsteadOfPrompting settings in October and November 2026 (changelog).Our AI agent security checklist covers these controls in more depth for agents you build into products. The governance side (model allow-lists, budgets, audit) is in governing AI coding agents in the enterprise. If you have inherited a codebase written mostly by an agent, start with taking a vibe-coded app to production.
BeevR is a senior, founder-led software and AI studio in Hanoi. We build for regulated industries: we sign a BAA as a business associate when healthcare data is involved, and we can run models inside the client's own AWS account. Our rule for any AI component, including our open-source Kite agent framework, is that the model proposes and deterministic code plus a human decide. For teams adopting coding agents, we can run a fixed-scope security phase from $10K. We add SAST and dependency checks to the agent loop, lock down sandbox and secret handling, and set up a review gate the agent cannot bypass. You get a working demo every Friday and keep all code and IP.
Read more about our security approach and how we work as an AI agent development company, or book a 30-minute call and bring a recent agent-written pull request. We will review it with you.