From the Palo Alto Networks edition of November 12, 2026
Veracode's Spring 2026 GenAI code security update: across 150-plus models, only 55% of unguided generation tasks produced secure code; Java at 29%, XSS 15% and log injection 13% pass rates
Veracode · Application security research · Global (model evaluation; no sector-specific sample)
- Publisher
- Veracode
- Original publication
- Veracode blog, by Felix Brombacher, Mar 24, 2026
- Source retrieved
- 2026-11-13
What happened
Veracode says it has evaluated more than 150 models to date, including GPT-5.1/5.2, Gemini 3 and Claude 4.5/4.6, on 80 code-completion tasks in Java, JavaScript, C# and Python covering four CWEs, scanning the output with its own SAST tool and deliberately supplying no security-specific prompting or guidance. Only 55% of generation tasks produced secure code, so 45% introduced a known flaw, while syntax correctness exceeded 95%. Pass rates were Python 62%, C# 58%, JavaScript 57% and Java 29%; SQL injection 82% and insecure cryptography 86%, but cross-site scripting 15% and log injection 13%. OpenAI's reasoning-focused GPT-5 models reached 70-72%. Veracode recommends mandatory SAST, security-focused prompting and human review.
Why it matters
Why now: Palo Alto's Nov. 12 Cortex Cloud post cites a matching 45% figure without a source; this is the likely independent baseline, and it measures unguided generation, which is the condition generation-time guardrails aim to change. Interpretation: public-sector teams should not assume newer models write secure code.
Evidence and measured results
Opened and read the full post. Method: 80 tasks, 4 languages, 4 CWEs, 5 instances per language-CWE combination, Veracode SAST detection. Results as listed in the finding. Limits: only four CWE types; detection by the author's own scanner; no guided-prompt or agent-with-tools condition reported; the full report sits on a separate interactive page that did not render as text.
Limitations and uncertainty
Published by a competing AppSec vendor using its own scanner; narrow CWE scope; tests unguided completion, not agents with tools or security guidance. Older than the last run; included because the Nov. 12 Palo Alto announcement relies on the same figure.
Put this evidence to work
Lighthouse Advisory interpretation, grounded in this source. Enriched 2026-11-13; this does not change the original publication date. Each role follows the same checklist so takeaways compare across sources.
Sales
Role takeaway
- Customer problem
- Organizations adopting AI coding tools lack an independent sense of how often generated code is insecure.
- Stakeholders
- AppSec lead
- Development manager
- CIO
- Audit or risk office
- Discovery questions
- Do you scan AI-generated code separately or measure its defect rate?
- How much of your codebase is Java?
- Is SAST mandatory in every pipeline?
- Value hypothesis
- Measuring local secure-code rates lets an institution decide where guardrails or review add the most value.
- Potential engagement
- A baseline measurement of agent-written code security across a sample of repositories.
- Unsupported claims
- That any guardrail product closes the 45% gap
- That results generalize beyond four CWE types
- That the figure is free of vendor interest
Pre-sales engineering
Role takeaway
- Fit
- Useful as a baseline for any team using AI coding assistants.
- Architecture and integration
- SAST in CI as backstop; optional generation-time rules upstream.
- Prerequisites
- SAST tooling in CI
- Ability to tag agent-written code
- Constraints
- Four CWE types only
- Single-vendor scanner
- No agent-with-tools condition
- Security
- Prioritize XSS and log-injection review and Java services.
- Proof of value
- Scan a sample of agent-written code and compare to Veracode's pass rates
- Repeat with security-focused prompting to measure change
Delivery
Role takeaway
- Work
- Establish a local baseline of AI-generated code security and track it over time.
- Dependencies
- Repository access
- SAST tool
- Developer tagging of AI-assisted commits
- Ownership
- AppSec lead.
- Skills and adoption
- Developers trained on data-flow vulnerabilities such as XSS and log injection.
- Governance checkpoints
- Agree measurement method before comparing tools
- Document study limits in reports
- Acceptance criteria
- Proposed: baseline pass rate measured by language and CWE within one quarter
- Proposed: quarter-over-quarter improvement reported
- Risks
- Inconsistent tagging of AI-written code
- Overgeneralizing a narrow benchmark
Implementation considerations
Lighthouse Advisory interpretation across the operating dimensions a public-sector buyer must settle before this evidence becomes a design. Each note answers the question under its heading for this specific source.
Architecture and integration
What must connect, and where does the AI sit in the workflow?
Because XSS and log injection require data-flow reasoning across files, pipeline-level SAST and review remain necessary even with generation-time rules.
Governance
Who approves, reviews and stays accountable for outcomes?
AI coding policies should require SAST on all agent-written code and language-specific attention to Java.
Security and privacy
What data, permissions and controls need testing?
Unguided AI code frequently introduces injection flaws that can expose citizen or student data in web applications.
Accessibility and workforce
Who is affected, and what skills or accommodations follow?
Human security review capacity remains a bottleneck; training developers on data-flow flaws stays relevant.
Procurement
What should contracts, pricing and exit terms secure?
Veracode sells SAST and competes with Palo Alto in application security; treat as vendor-published but independent of Palo Alto.
Operating model
Which teams own the service once it runs?
Measure secure-code rates on the institution's own stack rather than relying on model release claims.
Publication history
- 2026-11-12Palo Alto Networks · Issue 136 resources
Stable resource ID: veracode-spring-2026-genai-code-security-update-55-percent-pass-20260324