TL;DR: AI-assisted development is creating code and architectural change faster than traditional reactive AppSec models can absorb, according to Apiiro's interview with Thomas Dohmke. The core shift is toward preventative guardrails before deployment, because AI-driven velocity expands dependencies, integrations, and exploitable surface area faster than late-stage remediation can manage.
At a glance
What this is: This interview argues that AI is accelerating code generation so quickly that application security has to move from late discovery to preventative guardrails.
Why it matters: For IAM, PAM, NHI, and application security teams, faster code generation means faster privilege exposure, more secrets in motion, and a larger governance burden across human and non-human access paths.
👉 Read Apiiro's interview on AI-driven code generation and AppSec guardrails
Context
AI-assisted software development changes more than delivery speed. It increases the volume of code, integrations, and runtime dependencies that security teams must govern, which makes late detection a poor control model for modern application risk. In environments where software changes daily, security has to understand architecture early enough to influence how code, identities, and secrets are introduced into production.
The identity angle is real even when the topic is application security. AI-generated code often increases the number of service accounts, API keys, tokens, and machine-to-machine integrations that must be issued, reviewed, rotated, and offboarded. That means AppSec, IAM, and NHI governance now overlap more tightly than many programmes have planned for, and that overlap is becoming typical rather than exceptional.
Key questions
Q: How should security teams govern AI-generated code in production pipelines?
A: Security teams should treat AI-generated code as a controlled identity event, not just a development artifact. Require human approval, traceable authorship, scoped workload identities, and evidence of intent before production promotion. The goal is to preserve provenance and limit blast radius when generated logic behaves unexpectedly.
Q: Why does AI-assisted development increase application identity risk?
A: Because many applications implement identity controls in code, and AI tools can reproduce insecure login, token, and access patterns at scale. That means the risk is not limited to software defects. It extends to the trust boundaries that govern users, service accounts, and any downstream system that accepts those credentials as valid.
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: Who should be accountable when an AI agent causes a security incident?
A: Accountability should sit with the human owner, platform team, or business function that granted and operated the agent. The identity may act independently, but governance cannot detach responsibility from the delegation chain. Programs should define ownership, escalation, and remediation paths before deployment so responsibility is clear when the agent's behaviour changes.
Technical breakdown
Why AI-generated code expands the attack surface
AI-assisted coding changes the economics of software creation. When code volume rises quickly, developers create more third-party dependencies, more API calls, more secrets handling paths, and more opportunities for unsafe defaults. The risk is not only flawed code, but also the pace at which architectural decisions accumulate before security review can catch up. In practice, this means application security has to understand how AI tools shape code generation patterns, not just scan the final output.
Practical implication: security teams need earlier architectural review points for AI-assisted development, not just stronger post-commit scanning.
Preventative guardrails vs reactive remediation
Reactive AppSec assumes issues can be found cheaply after code is written or deployed. That assumption breaks when AI compresses development cycles and multiplies change. Preventative guardrails shift the control point left by enforcing policy, dependency constraints, and secure patterns while code is being produced. This is especially important where AI-generated code can quickly propagate unsafe authentication flows, overbroad permissions, or unmanaged secret usage into many repositories at once.
Practical implication: teams should codify secure-by-default controls in pipelines, templates, and approval workflows before code reaches production.
How AI code generation intersects with identity and secrets governance
Every new service integration or automation path can introduce a non-human identity, such as a token, API key, certificate, or workload credential. AI-generated software can create these dependencies faster than human review can track them, which increases the chance of orphaned secrets, excessive privileges, and weak lifecycle control. That makes application security an identity governance problem as well as a code quality problem, because the security of the application increasingly depends on the governance of the identities it uses.
Practical implication: AppSec and IAM teams should jointly inventory machine identities created by AI-assisted development and tie them to lifecycle controls.
NHI Mgmt Group analysis
AI-generated code has turned application security into a governance problem, not just a scanning problem. Static and runtime controls still matter, but they are no longer sufficient when code, dependencies, and integrations are produced at machine speed. The practical issue is that risk now accumulates before the traditional review window opens, which means security has to govern how software is created, not only how it behaves in production. Practitioners should treat AI-assisted development as a control design challenge, not a tooling upgrade.
The named concept here is AI governance debt. That is the gap created when organisations adopt AI-assisted coding faster than they can define policy, ownership, and review boundaries for the resulting software assets. The debt shows up in inconsistent guardrails, unclear approval paths, and invisible machine identities embedded in the delivery chain. The longer that debt persists, the harder it becomes to separate productivity gains from unmanaged risk. Practitioners should measure and reduce that debt before AI becomes the default path for all code creation.
Application security and identity governance are converging around the same control question: who, or what, is allowed to create trusted software artefacts? AI-generated code can introduce service accounts, secrets, and automated workflows that sit outside conventional developer oversight. That creates a direct intersection with NHI governance, because the identities that power software delivery now need lifecycle control, privilege boundaries, and accountability. Practitioners should align AppSec, IAM, and NHI governance around shared ownership of machine-created code paths.
Security teams should expect preventative controls to become the differentiator in AI-driven development programmes. The organisations that keep up will not be the ones that scan fastest after deployment, but the ones that prevent risky patterns from entering the pipeline in the first place. Frameworks such as NIST CSF and NIST SP 800-53 support that shift by emphasising configuration, access control, and integrity controls across the lifecycle. Practitioners should move governance left until the risk is visible at the point of code creation.
The future operating model is agent orchestration, but only if the agents themselves are governed. Thomas Dohmke’s point about Guardian Agents reflects a broader reality: AI will increasingly participate in code generation, review, and remediation workflows. That makes identity, authorization, and accountability for agent actions part of the application security model. Practitioners should design for controlled delegation, not implicit trust in any AI component that can modify software or trigger deployment paths.
What this signals
AI-assisted development will push more organisations into a control gap where code velocity outpaces the governance of the identities and secrets embedded in delivery pipelines. The practical response is not to slow development, but to make secure defaults and machine-identity oversight part of the platform itself.
AI governance debt: when teams adopt AI code generation faster than they define ownership for generated artefacts, they accumulate hidden risk across code, secrets, and automation. That debt becomes expensive when a leaked secret takes 27 days to remediate, which is why lifecycle controls for machine identities should be built into DevSecOps from the start.
As AI becomes a routine participant in software delivery, the boundary between AppSec and identity management will narrow further. Programmes that already connect [NIST SP 800-53 Rev 5 Security and Privacy Controls](https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final) with secret governance and workload identity will be better positioned than those treating them as separate disciplines.
For practitioners
- Embed secure code guardrails in AI-assisted pipelines Define policy checks, dependency allowlists, and secret-detection gates before code can merge or deploy. Make the controls operate on generated code and on the surrounding build artefacts, because AI often introduces risk through scaffolding as much as through business logic.
- Inventory machine identities created by development tooling Map every token, API key, certificate, and service account used by AI-enabled development workflows. Tie each one to an owner, a purpose, a rotation interval, and an offboarding path so the identity lifecycle is visible end to end.
- Shift AppSec review earlier in the architecture lifecycle Require architectural review for new AI-assisted services before code generation begins, especially where the design introduces new integrations, privileged workflows, or data access paths. Early review is the only practical way to prevent large volumes of insecure code from being normalised.
- Assign shared ownership across AppSec and IAM Build a joint control model for secure software creation, with AppSec handling code risk and IAM handling machine identity and access governance. This reduces the gap between code security and the non-human credentials that software now depends on.
- Measure policy drift in generated code paths Track how often AI-assisted changes bypass secure defaults, introduce new secrets, or create unmanaged service identities. If drift is rising, the issue is not developer behaviour alone, but control design that is lagging behind delivery velocity.
Key takeaways
- AI-generated code increases security risk because it scales dependencies, integrations, and machine identities faster than conventional review cycles can govern them.
- Late-stage remediation is too slow for modern delivery, especially when secrets and credentials can remain exposed for weeks before being fixed.
- The practical answer is preventative governance: secure defaults, architectural review, and shared ownership across AppSec, IAM, and NHI controls.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 address the attack and risk surface, while 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 development expands access and entitlement risk across software delivery paths. |
| NIST SP 800-53 Rev 5 | IA-5 | AI code pipelines depend on authenticators and secrets that must be managed over time. |
| NIST AI RMF | GOVERN | AI-generated code raises governance and accountability questions for automated systems. |
| OWASP Non-Human Identity Top 10 | NHI-03 | AI-assisted development can create unmanaged secrets and machine identities. |
Apply NHI-03 to inventory, rotate, and offboard non-human credentials created by tooling.
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.
- Preventative Guardrails: Controls that stop unsafe code, dependencies, or credentials from entering the software lifecycle in the first place. In application security, these are policy, architecture, and pipeline controls that operate before deployment rather than relying on later detection.
- Machine Identity: The digital identity of a machine, device, or workload — such as a server, container, or VM — used to authenticate it within a network. Sometimes used interchangeably with NHI, though NHI is the broader category.
- Guardian agent: A guardian agent is a supervising control that monitors AI agents in real time and enforces policy as they operate. In practice, it represents a shift from passive monitoring to active oversight of identity, behaviour, and execution timing across AI workflows.
What's in the full article
Apiiro's full interview covers the operational detail this post intentionally leaves for the source:
- Thomas Dohmke's direct commentary on how AI changes developer velocity and security operating models
- The interview framing around Guardian Agents and orchestration of AI-powered security workflows
- Apiiro's perspective on securing AI before code generation rather than relying on runtime discovery
- The broader discussion of how application security teams can preserve speed while adding preventative controls
Deepen your knowledge
The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity, and secrets management for teams that need stronger control over machine access. It is designed for practitioners who are aligning identity governance with modern software delivery and AI-assisted development.
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