TL;DR: Enterprise AI usage policies are not enough when AI-generated code bypasses traditional visibility and manual review cannot keep pace, according to LEGIT Security. The practical problem is enforceability, not non-compliance, because governance has to move closer to code creation and execution.
At a glance
What this is: This analysis argues that AI policy without enforcement breaks down in enterprise AppSec because AI-assisted development outpaces manual review and obscures code provenance.
Why it matters: It matters because IAM, PAM, and broader security teams increasingly inherit accountability for AI-driven outcomes without equivalent control over identities, workflows, or release paths.
By the numbers:
- Only 44% of developers are reported to follow security best practices for secrets management, exposing a significant developer behaviour gap.
- When AWS credentials are exposed publicly, attackers attempt access within an average of 17 minutes and as quickly as 9 minutes in some cases.
👉 Read LEGIT Security's analysis of why AI policy without enforcement fails at scale
Context
AI-assisted software development changes the control problem in AppSec. Traditional review models assume code is authored by humans, committed through known paths, and inspectable before release, but AI-generated code can bypass those visibility points and arrive faster than manual governance can absorb. The primary gap is not policy intent, it is policy enforceability at the point where code is created.
For identity and access teams, the lesson is broader than application security. When work is generated, modified, or accelerated by AI tools, the organisation still needs provable control over who can create, approve, and deploy changes. That makes governance, workflow enforcement, and contextual access controls part of the same security conversation, not separate programmes.
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: Why does AI-assisted development create a governance problem beyond code quality?
A: AI-assisted development changes who creates code, how fast it moves, and how difficult it is to trace. That creates a governance problem because security teams can inherit accountability without having equivalent visibility or control over the generation and approval process. The challenge is not just code quality, but enforceable oversight across the lifecycle.
Q: What breaks when security policies are not enforced near the point of code creation?
A: When enforcement sits only at the policy or review layer, AI-generated changes can pass through before anyone notices the context that shaped them. That weakens root-cause analysis, slows remediation, and increases the number of teams touched by a defect. Controls have to operate where code is created, not only where it is inspected.
Q: Who is accountable when an AI coding tool introduces insecure code into production?
A: Accountability stays with the organisation that allowed the tool to operate without enforced guardrails. The model is not the accountable party. Security, engineering, and platform owners share responsibility for defining policy, enforcing it at runtime, and logging the decision trail that proves controls were applied.
Technical breakdown
Why AI-generated code breaks traditional AppSec review paths
Traditional AppSec assumes a linear flow: a developer writes code, commits it, and security reviews it before release. AI-assisted development disrupts that model by creating code fragments outside familiar authorship signals, often across multiple tools and team workflows. Static policies can describe acceptable use, but they do not enforce provenance, context, or approval at the moment of creation. The result is a governance gap where risk enters the pipeline before anyone can classify or inspect it.
Practical implication: move enforcement to the creation and commit layer, not just the policy portal.
What contextual and continuous enforcement means in practice
Contextual enforcement means controls operate with awareness of the environment in which code is being produced, including repository, identity, project sensitivity, and release stage. Continuous enforcement means the control does not stop at a one-time approval. Instead, it persists through code generation, commit, review, merge, and deployment. This is especially relevant where AI output can be copied, edited, or reused across teams, because a single policy decision cannot govern all downstream uses.
Practical implication: tie authorisation and guardrails to workflow states, not just user intent.
Why visibility is the missing control layer for AI in AppSec
Visibility is the control that lets security teams see where AI-generated content enters the software lifecycle, who touched it, and whether the resulting change matches expected patterns. Without that layer, teams inherit accountability after the fact but cannot reconstruct cause quickly enough to contain the issue. In practice, this is a timing problem: the later a risky change is discovered, the more teams, systems, and release gates it affects.
Practical implication: instrument AI-assisted development so provenance and review signals are captured before code reaches production.
NHI Mgmt Group analysis
AI governance debt is becoming an AppSec control gap. Enterprise teams can write policies faster than they can enforce them, and that mismatch creates accumulated governance debt. AI-assisted development shifts risk upstream into code creation, where existing AppSec tools were not designed to inspect authorship, intent, or reuse. The practical conclusion is that policy maturity without enforcement architecture is an incomplete control model.
Enforcement has to move closer to creation if organisations want measurable control. Manual review and downstream gatekeeping cannot keep up with distributed AI use across teams and regions. The article points to a broader operating model change: controls must become contextual and continuous, especially where AI-generated code can move from draft to deployment in compressed timelines. Practitioners should treat this as a workflow design problem, not a documentation problem.
Shared accountability without shared visibility is a governance failure. The article highlights a familiar enterprise pattern where security inherits responsibility after vulnerabilities appear, while platform and development teams retain local autonomy. That breaks the basic assumption that control and accountability travel together. In identity terms, this is a lifecycle and authorisation issue because the system needs provable control over who can create and approve code paths, not just who can read the policy.
AI-assisted development is forcing a new control layer above classic AppSec tools. Existing scanners, reviews, and repository controls remain necessary, but they no longer cover the full decision surface. The emerging requirement is for governance that can see AI use, enforce context-aware guardrails, and preserve auditability across the development lifecycle. For practitioners, the question is no longer whether AI belongs in software delivery, but whether the control stack can still explain and constrain it.
What this signals
AI governance debt: organisations are accumulating policy intent faster than they can instrument enforcement, which means AppSec programmes will increasingly be judged by control placement rather than policy volume. Teams should expect more pressure to prove where AI-generated changes are detected, challenged, and approved, especially when those changes affect sensitive code paths.
The practical signal is that identity and workflow controls will matter more in AI-enabled development than in conventional review models. Security leaders should align approval rights, provenance logging, and least-privilege access to the same change lifecycle so accountability remains auditable end to end.
For practitioners
- Enforce AI code provenance at creation time Capture whether code was generated, edited, or copied by AI tools before it reaches the repository, and require that metadata to travel with the change record.
- Bind AI usage rules to workflow controls Translate AI policy into repository, CI/CD, and approval gates so prohibited patterns are blocked by default rather than flagged after merge.
- Add contextual review for high-risk code paths Apply stronger checks to sensitive applications, regulated data flows, and privileged automations where AI-generated changes create higher blast radius.
- Preserve auditability across the full development lifecycle Log who generated, approved, and deployed AI-assisted changes so root cause analysis can reconstruct the decision chain without relying on memory.
- Review identity controls around AI-enabled workflows Map who can invoke AI tools, approve generated output, and release code into production, then align those permissions with least privilege and segregation of duties.
Key takeaways
- AI policy alone does not control AI-assisted development when code can bypass traditional visibility and manual review.
- The central issue is enforceability at the point of creation, not simply developer compliance after the fact.
- AppSec programmes now need contextual, continuous controls that preserve provenance and auditability across the development lifecycle.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST CSF 2.0, NIST SP 800-53 Rev 5 and NIST AI RMF set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.AC-4 | AI-assisted code governance depends on enforcing least privilege across workflows. |
| NIST SP 800-53 Rev 5 | AC-6 | Least privilege is central when AI tools expand who can influence code paths. |
| NIST AI RMF | GOVERN | AI governance requires defined accountability and oversight for AI-enabled development. |
Apply AC-6 to limit AI tool access, approval rights, and deployment permissions to required roles.
Key terms
- AI Governance: AI governance is the set of controls used to discover, classify, approve, restrict, monitor, and revoke AI-enabled access. It connects identity, data, and policy so organisations can manage what AI can reach, what it can share, and when it should be stopped.
- Context-aware Enforcement: Context-aware enforcement is policy that changes based on live conditions such as data sensitivity, environment, or task type. For AI agents, it is the difference between a static permission grant and a control that adapts to what the agent is trying to do right now.
- Provenance: Provenance is the traceable history of where a software artifact came from, who approved it, and what controls were applied along the way. In container security, provenance supports trust decisions because it links delivery steps to accountable identities and review points.
- Continuous governance: An identity governance model that checks and enforces policy as activity happens rather than on a schedule. It is designed to catch drift, misuse, and orphaned access while the identity is still active, which matters when risk unfolds in minutes instead of review cycles.
What's in the full article
LEGIT Security's full analysis covers the operational detail this post intentionally leaves for the source:
- Implementation guidance for enforcing policy at repository, CI/CD, and release gates.
- Operational examples of visibility and provenance controls for AI-assisted code.
- A deeper explanation of how shared accountability breaks down across development, platform, and security teams.
- The whitepaper download and source context for the article's control model.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, IAM, identity lifecycle, and secrets management. It helps security practitioners connect identity control design to the broader programmes they are responsible for.
Published by the NHIMG editorial team on August 18, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org