{"resourceId":"veracode-spring-2026-genai-code-security-update-55-percent-pass-20260324","versions":[{"version":"external-ada0d8d1eb5012e3f203c479b011b8f504c193a7e368eca6f15f4c80a29a996e","resource":{"id":"veracode-spring-2026-genai-code-security-update-55-percent-pass-20260324","title":"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","organization":"Veracode","sector":"Application security research","geography":"Global (model evaluation; no sector-specific sample)","publishedAt":"Veracode blog, by Felix Brombacher, Mar 24, 2026","publicationDate":"2026-03-24","eventDate":null,"sourceName":"Veracode","sourceLabel":"Spring 2026 GenAI Code Security Update: Despite Claims, AI Models Are Still Failing Security","sourceUrl":"https://www.veracode.com/blog/spring-2026-genai-code-security/","evidenceClass":"independent-research","outcomeClass":"cautionary","topics":["developers-agents","data-security"],"finding":"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.","sledRelevance":"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":"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.","architectureImplications":"Interpretation: because XSS and log injection require data-flow reasoning across files, pipeline-level SAST and review remain necessary even with generation-time rules.","governanceImplications":"Interpretation: AI coding policies should require SAST on all agent-written code and language-specific attention to Java.","securityPrivacyImplications":"Unguided AI code frequently introduces injection flaws that can expose citizen or student data in web applications.","caveats":"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.","streamIds":["palo-alto-networks"],"roles":{"sales":"Sales framing: this is the independent baseline behind the 45% insecure-code figure circulating in vendor pitches, including Palo Alto's Nov. 12 post. It supports a measured conversation: unguided AI code fails security checks often, especially in Java and for XSS. That justifies pipeline SAST and review for any agency or campus using coding agents. It does not show that any guardrail product fixes the problem; Veracode tested no guided or tool-using condition, and it sells competing tools.","engineering":"Engineering framing: the method is narrow but clear: 80 tasks, four languages, four CWEs, scanned by Veracode SAST without security prompting. Results vary sharply: SQL injection and crypto mostly pass, XSS (15%) and log injection (13%) mostly fail, and Java lags at 29%. Engineers should weight review toward data-flow flaws and Java services, keep SAST in CI regardless of model, and test whether guided prompting or MCP-delivered rules change these rates on their own code.","delivery":"Delivery framing: use these figures to set a baseline measurement plan: sample agent-written code from your own repositories, scan it, and track pass rates by language and CWE before and after adding guardrails. The AppSec lead should own measurement and the development manager should own remediation. Acceptance should be defined as locally measured improvement, not vendor benchmarks. Note the study's limits in any report, since it uses one vendor's scanner and four CWE types."},"roleDetails":{"sales":{"customerProblem":"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"],"discoveryQuestions":["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?"],"valueHypothesis":"Measuring local secure-code rates lets an institution decide where guardrails or review add the most value.","potentialEngagement":"A baseline measurement of agent-written code security across a sample of repositories.","unsupportedClaims":["That any guardrail product closes the 45% gap","That results generalize beyond four CWE types","That the figure is free of vendor interest"]},"engineering":{"fit":"Useful as a baseline for any team using AI coding assistants.","architectureIntegration":"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.","proofOfValue":["Scan a sample of agent-written code and compare to Veracode's pass rates","Repeat with security-focused prompting to measure change"]},"delivery":{"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.","skillsAdoption":"Developers trained on data-flow vulnerabilities such as XSS and log injection.","governanceCheckpoints":["Agree measurement method before comparing tools","Document study limits in reports"],"acceptanceCriteria":["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"]}},"retrievedAt":"2026-11-13T03:58:42Z","enrichedAt":"2026-11-13T04:06:37Z","enrichmentBasis":"retrieved source","accessibilityWorkforceImplications":"Interpretation: human security review capacity remains a bottleneck; training developers on data-flow flaws stays relevant.","procurementImplications":"Veracode sells SAST and competes with Palo Alto in application security; treat as vendor-published but independent of Palo Alto.","operatingModelImplications":"Interpretation: measure secure-code rates on the institution's own stack rather than relying on model release claims.","sourceVerification":{"openedUrl":"https://www.veracode.com/blog/spring-2026-genai-code-security/","referenceExcerpt":"nearly half of all AI-generated code contains known security vulnerabilities when no security guidance is explicitly provided","promptVersion":"sled-research-v4.0","model":null,"basis":"agent-reported inspection"}}}]}