By NHI Mgmt Group Editorial TeamDomain: AI SecuritySource: VeracodePublished July 28, 2026

TL;DR: As AI now authors roughly half of committed code in adopted environments, Veracode reports that 44% of code-generation tasks still introduce vulnerabilities and the average security pass rate remains 56%, showing that secure output has not improved at the pace of adoption. The operational problem is no longer whether AI can write code, but whether verification, remediation, and governance can keep up.


At a glance

What this is: Veracode’s 2026 GenAI Code Security Report says AI is writing more production code, but secure output is not improving at the same pace.

Why it matters: For AppSec and IAM practitioners, this shifts the problem from code generation to control design, because upstream automation can amplify risk faster than review, policy, and accountability can absorb it.

By the numbers:

👉 Read Veracode's 2026 GenAI Code Security Report on AI-generated code risk


Context

GenAI code security is now a governance problem, not just a developer productivity issue. When AI systems produce a large share of the code entering production, security teams have to verify outputs at scale, not just review isolated snippets. The primary keyword here is GenAI code security, and the core issue is that model output quality and security quality are diverging.

That matters because software pipelines are already absorbing more risk than many teams can absorb operationally. The article’s findings point to a familiar control gap in a new form: faster generation creates more opportunities for insecure code to reach production before review catches up. In identity-heavy environments, that same pattern appears when machine-authored changes affect secrets handling, access control, or workflow automation without equivalent oversight.


Key questions

Q: How should security teams govern AI-generated code in production environments?

A: Security teams should treat AI-generated code as normal production code with extra provenance risk. Require architectural review, test coverage, static analysis, and approval before merge. Then bind the agent and the build pipeline to least privilege, short-lived credentials, and complete audit logging so implementation speed does not outrun control.

Q: When does AI-assisted development create more risk than it reduces?

A: It becomes net risk when code volume grows faster than ownership, review, and fix capacity. That is especially true when secrets, dependencies, and business logic are handled in separate tools. If teams cannot prioritise by reachability and impact, speed turns into hidden debt.

Q: What do teams get wrong about securing AI coding assistants?

A: Teams often focus on code output and ignore the agent boundary, where file reads, tool outputs, and external content shape the next action. That misses the real control point. The right question is whether untrusted input can influence privileged behaviour before the code is even written or committed.

Q: How can organisations measure whether GenAI code security controls are working?

A: Track the proportion of AI-generated changes that fail security checks, the time to remediate vulnerabilities introduced by AI output, and the share of high-risk code paths covered by mandatory review. If those numbers are flat or worsening as AI usage grows, the governance model is not keeping pace.


Technical breakdown

Why syntax correctness does not equal secure code

Large language models can produce code that compiles and follows language grammar while still embedding unsafe logic, weak input handling, or insecure defaults. Syntax is a surface property. Security depends on contextual judgement, such as knowing when validation must be strict, where trust boundaries exist, and how data flows across components. That is why a model can appear competent while still introducing exploitable weaknesses. In practice, this creates a false sense of assurance for teams that equate functional output with safe output.

Practical implication: validate AI-generated code for security properties, not just build success.

Why model choice is now a security control

The report shows that model performance is not uniform across the field. Some models produce fewer vulnerable outputs than others, which means the selected model influences downstream review volume and remediation load. This makes model selection a governance decision, not only a cost or productivity choice. For security teams, the important point is that the model itself becomes part of the control stack, especially when it is allowed to generate code at scale across multiple teams or repositories.

Practical implication: assess models on security pass rate before approving them for production development workflows.

Where verification must concentrate: vulnerability classes and context

The report’s spread across vulnerability types shows why one-size-fits-all review fails. Some issues, like SQL injection, are easier for models to handle because the pattern is familiar and repetitive. Others, such as cross-site scripting and log injection, depend on application context and data flow, which models handle less reliably. That means the highest-risk output often sits where context matters most and where automated generation is least trustworthy. Verification should therefore focus on code paths with user input, logging, templating, and security-sensitive transformation logic.

Practical implication: prioritise security review on context-heavy code paths and high-impact vulnerability classes.


Threat narrative

Attacker objective: The attacker’s objective is to exploit insecure AI-generated code to gain access, execute malicious input, or trigger data exposure in production systems.

  1. Entry begins when AI-generated code is accepted into the development pipeline without equivalent security verification.
  2. Escalation occurs when repeated vulnerable output accumulates across multiple commits, reviews, and downstream integrations.
  3. Impact follows when insecure code reaches production and expands the organisation’s exposed attack surface.

NHI Mgmt Group analysis

GenAI code security is becoming a software trust problem, not a developer tooling problem. When AI authors a substantial share of committed code, the question shifts from speed to assurance. Security teams have to treat AI output as an untrusted software input that requires verification, policy, and traceability. That makes this a control-plane issue for AppSec, not a side conversation about developer efficiency. The practical conclusion is that secure delivery depends on security acceptance criteria for AI-written code, not just output volume.

Model selection has become a governance decision with direct risk consequences. The report’s spread across models shows that productivity and security are not interchangeable. Some models reduce downstream remediation load, but none remove the need for control validation. That means procurement, platform engineering, and AppSec need a shared evaluation model that includes security pass rate, not just performance benchmarks. The practitioner conclusion is that model approval should be tied to measurable security outcomes.

GenAI code security reveals a verification trust gap: organisations are trusting generated code faster than they can inspect it. This is the named concept this report sharpens. The failure is not only vulnerable output, but the assumption that review capacity and governance can scale linearly with AI-generated volume. That assumption is breaking first in high-churn engineering environments, and it is especially dangerous where code influences secrets, access paths, or authentication flows. The practical conclusion is that verification must move upstream into the workflow.

Identity-adjacent controls will absorb part of this risk, but they cannot compensate for insecure code design. When AI-generated code touches access control, token handling, secrets, or workflow permissions, IAM and PAM controls help constrain blast radius. But they do not fix flawed application logic or insecure defaults introduced before deployment. This is where AppSec and identity governance meet: the code path must be secure, and the access path must be bounded. The practical conclusion is to treat AI-written identity-sensitive code as a shared AppSec and IAM responsibility.

The market is moving from AI enablement to AI governance maturity. Teams are no longer asking whether to use coding assistants. They are asking how to govern them without overwhelming remediation capacity or weakening software trust. That shift will favour organisations that can measure model behaviour, enforce code verification, and connect output risk to operational ownership. The practical conclusion is that AI coding programmes now need the same discipline as any other high-impact production control surface.

What this signals

Verification has become the control centre for GenAI code security. As code volume rises, the programme risk is no longer limited to obvious defects. Teams need to watch how quickly insecure output moves from prompt to merge to production, and whether policy checks are embedded early enough to prevent that acceleration from becoming normal.

AI coding programmes will increasingly intersect with identity governance. When generated code touches secrets, tokens, service accounts, or access control logic, AppSec and identity teams need shared review criteria. That makes machine identity, secrets handling, and code provenance part of the same operating model rather than separate workstreams.

Security leaders should expect model governance to be measured alongside traditional application controls. The practical signal is not whether AI is in use, but whether organisations can show that insecure output is being detected, prioritised, and remediated before it becomes a production dependency.


For practitioners

  • Set security acceptance criteria for AI-generated code Define which code paths require mandatory human review, security scanning, or approval before merge. Use stricter thresholds for authentication logic, secrets handling, logging, and any code that alters trust boundaries.
  • Evaluate models on security pass rate before broad rollout Compare model candidates using the same security task set and track the percentage of vulnerable outputs over time. Do not approve models on speed alone when they will generate production code at scale.
  • Move verification into the development workflow Embed SAST, secure code review, and policy checks where code is written and merged, not only after release. The control objective is to stop insecure AI output before it reaches production branches.
  • Prioritise remediation by exploitability and code context Triage AI-generated vulnerabilities by exposure, data sensitivity, and whether the flaw sits in user-input, templating, or access-control paths. That reduces backlog noise and focuses scarce review time where failure is most costly.

Key takeaways

  • AI-generated code is scaling faster than security assurance, which turns GenAI code security into a control problem rather than a novelty problem.
  • Model choice now affects downstream remediation load, but no model in the report eliminates the need for verification.
  • The practical response is to move security checks upstream, tie model approval to measured pass rates, and govern AI-written code like any other production risk surface.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST AI RMFGOVERNAI code generation raises governance and accountability questions under AI RMF.
NIST CSF 2.0PR.AC-4Generated code that touches access logic and secrets ties directly to access control discipline.
NIST SP 800-53 Rev 5SI-2Software flaw remediation is central when AI output introduces vulnerabilities into production code.
CIS Controls v8CIS-16 , Application Software SecurityApplication security controls are the natural fit for insecure AI-generated code in production pipelines.
OWASP Agentic AI Top 10The report touches AI-generated code and governance patterns relevant to agentic AI development.

Assign governance for AI coding tools, approval criteria, and auditability under GOVERN before broad deployment.


Key terms

  • GenAI Code Security: GenAI code security is the discipline of governing code produced by generative AI so that it is not only functional, but also safe to ship. It combines model evaluation, workflow verification, remediation prioritisation, and policy controls around where AI-generated code is allowed to enter production.
  • Security Pass Rate: Security pass rate is the proportion of evaluated outputs that meet a defined security standard without introducing a vulnerability. In code-generation contexts, it is a useful measure because it separates syntactic correctness from actual security quality and helps compare models under the same test conditions.
  • Verification workflow: A verification workflow is the sequence of checks, decision branches, and escalation rules used to approve or reject an onboarding attempt. Strong workflows are configurable by risk and geography, and they preserve an audit trail showing why each identity decision was made.

What's in the full report

Veracode's full report covers the operational detail this post intentionally leaves for the source:

  • Model-by-model security pass rates and the relative spread between stronger and weaker code-generation systems
  • Vulnerability-class breakdowns that show where AI output fails most often, including context-heavy weaknesses
  • Research on how AI code volume is changing review queues, remediation pressure, and governance demand
  • The report's broader findings on safe enablement, workflow verification, and platform decision-making

👉 The full Veracode report covers model comparisons, vulnerability patterns, and remediation implications in more detail.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps practitioners connect identity controls to the broader security programmes that must absorb AI-driven change.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 1, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org