By NHI Mgmt Group Editorial TeamBased on Pluto Security: “Claude Code Security: Why AI-Generated Code Breaks Traditional Security Models” (October 20, 2026)

TL;DR: Claude Code and similar AI coding systems are breaking traditional security models because they produce opaque, probabilistic code with weaker accountability, inconsistent dependencies, and hidden risk paths that conventional review and governance were not designed to catch, according to Pluto Security research. The practical answer is to treat AI-generated code like third-party software and verify, instrument, and govern it differently.


At a glance

What this is: Pluto Security says Claude Code-style AI coding systems are undermining traditional application security assumptions by introducing opaque logic, weak accountability, and governance gaps into software delivery.

Why it matters: This matters because AI-generated code can bypass the control expectations that IAM, AppSec, and SDLC teams rely on, especially where secrets, authentication logic, and privileged workflows are involved.


Context

AI-generated code changes the security problem before the code even runs: the issue is not only whether a function is vulnerable, but whether its origin, intent, dependencies, and privilege assumptions can be governed at all. In AI-assisted development, traditional review models assume a human author who can explain choices and be held accountable; that assumption weakens once code is produced by a model.

Claude Code sits inside this shift because it can generate production-relevant logic at speed, which makes the identity and provenance of the code path itself part of the control problem. That creates a direct intersection with AI coding agents security because the security question is no longer just what the code does, but who or what influenced it and under what governance.


Key questions

Q: What breaks when AI-generated code reaches production without stronger governance?

A: Security teams lose the ability to distinguish routine change from exploitable exposure, and vulnerable code can enter production faster than review, testing, and remediation processes can catch up. The failure is not just technical. It is a governance mismatch between release speed and control capacity, which leaves organisations accepting risk they have not actually examined.

Q: Why does AI-driven coding increase application security risk even when it improves productivity?

A: Because productivity gains increase change volume faster than teams can classify and review the resulting software. The risk is not merely more code, but more unknown code paths, dependencies, and data flows reaching production before ownership and exposure are clear.

Q: What do security teams get wrong about AI-generated code risk?

A: They often focus on catching insecure output after code is written, which is too late for AI-native workflows. The more important control point is the moment the agent is allowed to initiate the action. If that step is not governed, testing becomes a detection layer rather than a prevention layer.

Q: Should organisations govern AI assistants and AI coding tools together?

A: Yes, because both create the same core risk pattern: AI can access sensitive material, transform it, and move it into places that traditional review processes do not control in real time. Treating assistants and coding tools as separate problems usually creates policy gaps, duplicated tooling and inconsistent evidence. A unified control model is easier to defend and audit.


Technical breakdown

Why AI-generated code breaks deterministic review models

Traditional SDLC review assumes code is deliberate, explainable, and produced through a stable decision process. AI-generated code is probabilistic: the same prompt can yield different functions, validation logic, or error handling, which makes reproducibility and review harder. That matters because security controls such as threat modeling, secure design review, and code ownership depend on a clear chain of intent. When the author is a model, the organization must verify output quality rather than rely on human judgment embedded in the code creation step.

Practical implication: Shift review from author trust to output verification, with security checks that evaluate the code itself rather than its presumed intent.

How AI code introduces dependency and secret exposure risk

AI coding systems can pull in dependencies that are not aligned with approved package policy, including obscure packages, deprecated libraries, vulnerable transitive chains, and unpinned versions. They can also generate secrets, tokens, or unsafe fallback logic directly into repository artefacts. That makes dependency governance and secret scanning inseparable from AI-assisted coding. The risk is not only malicious insertion, but the model’s lack of awareness of organizational allowlists, lifecycle controls, and package provenance requirements.

Practical implication: Bind AI-generated commits to deterministic dependency rules, package allowlists, SBOM generation, and secret detection before merge.

Why AI coding changes the control model for authentication and authorization

The article highlights silent authentication bypass patterns, over-permissive API exposure, hidden injection sinks, and broken access controls as common failure modes. Those are not just code quality issues. They are governance failures when an AI system can generate logic that looks functional but weakens the access model, especially across backend and client code produced from the same prompt. In practice, this means authentication and authorization can degrade without an obvious security exception being raised.

Practical implication: Add AI-specific security tests for authentication and authorization paths, especially where generated code touches privileged workflows or API exposure.


Threat narrative

Attacker objective: The attacker objective is to turn AI-generated software artefacts into a durable path for unauthorized access, secret exposure, or application compromise.

  1. Entry occurs when an AI coding assistant is used inside the development workflow and is allowed to influence production code, dependencies, or configuration.
  2. Credential and secret exposure follows when generated code embeds tokens, hardcoded secrets, or over-permissive access paths into repositories and build artefacts.
  3. Escalation happens when insecure logic, unsafe imports, or broken authorization patterns reach deployed services and widen the attack surface.
  4. Impact is downstream compromise of applications, pipelines, and data access paths through code that passed functional checks but failed security governance.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

AI-generated code has become a governance object, not just a development output. Once a model is writing logic that reaches production, security teams are no longer governing developer behaviour alone. They are governing machine-influenced code paths, which means provenance, review context, and accountability must be explicit controls rather than implicit assumptions. The practical conclusion is that AI-assisted development needs its own control plane.

The deepest risk is not that AI writes bad code, but that it writes plausible code with invisible security debt. The article correctly points to hidden injection sinks, authentication drift, and insecure fallback logic as recurring failure modes. Those issues are dangerous because they pass functional testing while eroding trust boundaries that application security depends on. The practitioner lesson is that apparent correctness is not a security signal in AI-generated code.

AI coding exposes a new form of control failure: security standards built for human intent are being applied to machine output. That creates a gap between how OWASP SAMM, NIST SSDF, and similar programmes were designed and how code now enters the pipeline. The result is a compliance and assurance mismatch, not just a tooling problem. Teams need to redesign the governance model around output validation, not human assumption.

Claude Code-style development also reinforces the need for identity-aware software governance. When prompts, commits, and generated artefacts can all influence privilege, the distinction between code generation and access control narrows. That is why agentic AI security policy matters: policy has to cover registration, oversight, and retirement of AI systems that can shape production behaviour. The practical conclusion is that code governance and identity governance now overlap materially.

Detection-response latency: AI-generated code can introduce risk faster than conventional review cycles can identify it. That is the real operational gap. If a team waits for post-merge or post-deploy review to catch generated logic flaws, the window for exposure is already open. The practitioner conclusion is to move control decisions upstream into generation, commit, and merge workflows.

From our research library:

  • Companies are dedicating an average of 32.4% of their security budgets to secrets management and code security, with US organisations leading at 40.8%, according to the State of Secrets in AppSec.
  • Claude Code-assisted commits leaked secrets at a rate of 3.2%, more than double the human-only baseline of 1.5%, with peaks reaching 31 secrets per 1,000 commits in August 2025, according to the State of Secrets Sprawl 2026.
  • Read next: AI Coding Agents Security Guide

What this signals

AI code security is shifting from code quality to control-plane design. The key change is that teams can no longer rely on code review alone to discover risky logic, because generated output may be internally consistent while still violating access, dependency, or secrets policy. That pushes governance toward generation-time controls, merge-time checks, and release gates rather than post-hoc remediation.

AI coding also creates a new identity problem for software delivery. The prompt, the model, and the resulting artefact can each influence privilege, provenance, and trust. That is why security leaders should treat AI-assisted development as a governed workflow with explicit policy boundaries, not a faster version of the old one.


For practitioners

  • Classify AI-generated commits as security-relevant artefacts Tag commits produced with coding assistants, route them through separate review workflows, and require repository metadata that preserves origin and context.
  • Enforce deterministic dependency governance Require lockfiles before merge, generate SBOMs for AI-assisted commits, block non-approved packages, and scan for CVE drift continuously.
  • Add AI-specific controls to code review and SAST Use dedicated SAST profiles for AI code, require security linting on generated output, and verify authentication and authorization paths explicitly.
  • Harden prompt governance as part of SDLC policy Prohibit prompts that ask for bypasses or shortcuts, keep secure prompt templates, and retain prompt audit logs as security records.
  • Treat AI outputs as untrusted until verified Assume business logic is externally influenced, review privilege paths separately, and make monitoring part of the release gate rather than a post-release activity.

Key takeaways

  • AI-generated code changes the security question from whether developers are careful to whether machine-produced output can be governed before it reaches production.
  • The article points to hidden authentication, dependency, and secrets failures that conventional review processes often miss until after deployment.
  • The control gap is not only in code quality tooling but in the lack of AI-specific governance around prompts, commits, and merge workflows.

Related NHI Mgmt Group resources: AI Coding Agents Security Guide · Agentic AI Security Policy Template · AI Agent Identity Security Buyer's Guide · Agentic AI Security Guide


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 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseAI-generated code can create privilege and authentication drift in development workflows.
Recommendation — Apply ASI03 controls to prevent AI-generated logic from weakening access and privilege boundaries.
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageThe article explicitly cites embedded secrets and leaked credentials in AI-generated code.
Recommendation — Scan AI-generated commits for secret leakage and revoke exposed credentials immediately.
NIST SP 800-53 Rev 5SA-10 — Developer Configuration ManagementAI-assisted code requires governed dependency and artefact control in the SDLC.
SA-11 — Developer Testing and EvaluationThe article emphasizes security validation beyond functional testing for AI-generated code.
Recommendation — Use SA-10 to control AI-assisted code changes, dependency provenance, and build artefacts. Apply SA-11 to test AI-generated code for security defects before deployment.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsBroken access control and over-permissive APIs are central risks in the article.
Recommendation — Align AI code reviews with PR.AA-05 to verify access logic before release.

Key terms

  • AI-generated code: Software produced wholly or partly by an AI model or agent rather than a human developer. The security concern is not authorship alone, but whether the resulting logic, access control, and dependency choices have been independently verified before release.
  • Prompt Governance: Prompt governance is the set of controls used to manage who can create, edit, approve, and roll back prompts in a live AI system. It treats prompts as change-controlled artefacts because small text changes can materially alter model behaviour, data exposure, and tool use.
  • Deterministic Dependency Resolution: Deterministic dependency resolution means a build produces the same package set every time because versions are pinned and locked. It reduces surprise during recovery and makes it easier to prove that a known-bad dependency has been removed from the software delivery path.
  • Security linting: Automated checking that looks for security-relevant patterns in generated or human-written code before it merges or deploys. In AI-assisted development, it is used to catch insecure defaults, risky authentication logic, secret exposure, and other defects that functional tests may miss.

Deepen your knowledge

NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and identity lifecycle controls. It helps security and identity teams apply rigorous governance to systems that influence trust, access, and automation.
NHIMG Editorial Note
Published by the NHIMG editorial team on October 22, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org