TL;DR: AI code security risk is now the dominant developer concern, with 57% worried about exposing sensitive company or customer data while only 37% of organisations have tightened code security practices, according to Sonar’s State of Code Developer Survey. The pattern points to a verification gap, not just an adoption gap: teams are generating faster than they can reliably review.
At a glance
What this is: Sonar’s survey shows that developers see AI-generated code as a security risk, with concern rising faster than code-security governance and verification practices.
Why it matters: IAM, NHI, and engineering governance teams need to treat AI-assisted development as a control problem because ungoverned tool use and weak verification can turn fast code generation into persistent exposure.
By the numbers:
- 57% of developers worry that using AI risks exposing sensitive company or customer data.
- Only 37% of organisations have become more rigorous about code security because of AI.
- Teams juggle an average of four different AI tools, and 35% of that usage happens through personal, ungoverned accounts.
- 61% of developers agree that AI often produces code that looks correct but isn't reliable.
Context
AI-assisted code generation changes the control problem for engineering teams because output can look correct while still hiding defects, insecure logic, or policy violations. The governance gap is not just about adopting AI tools, but about proving that generated code is reviewed, attributed, and verified before it reaches production.
The identity angle here is real even though the topic is software security: when developers use personal, ungoverned AI accounts, the organisation loses visibility into who generated what, under which controls, and with which data. That weakens accountability across both human identity and emerging AI-assisted workflows.
Key questions
Q: What breaks when AI-generated code is reviewed without security gates?
A: What breaks is the assumption that a clean-looking diff is a safe diff. AI-generated code can hide unsafe defaults, dependency issues, and weak validation that basic review misses. Without CI-enforced tests and security checks, the merge process becomes a distribution channel for defects rather than a control point.
Q: Why do personal AI accounts create governance risk in software teams?
A: Personal accounts break visibility, ownership, and policy enforcement. They make it harder to prove which model or tool generated code, whether corporate data was exposed, and whether approved safeguards were applied. From a governance perspective, the account becomes part of the control boundary, so unmanaged accounts weaken accountability across the development lifecycle.
Q: How should financial institutions verify AI-assisted code before release?
A: They should place automated verification in the development path, not after it. Static analysis, policy checks, dependency review, and quality gates need to run in pull requests and CI/CD so security and quality issues are visible before release approval. That creates evidence for governance while reducing the burden on manual reviewers.
Q: When should teams restrict AI tools in development workflows?
A: Teams should restrict AI tools whenever they cannot be tied to managed identities, approved storage, and auditable usage. If the organisation cannot see where prompts, outputs, and code changes flow, the toolchain is operating outside acceptable governance. That is especially important for regulated data, sensitive repositories, and high-impact production systems.
Technical breakdown
Why AI-generated code creates a verification problem
Large language models can produce code that compiles cleanly and even passes superficial review, yet still contains insecure logic, brittle assumptions, or hidden data exposure paths. The challenge is that software quality defects are no longer always syntax failures. Instead, they emerge as semantically plausible code that requires deterministic validation, not just human confidence. This is why AI changes the assurance model: teams must verify behaviour, not just examine output. The governance issue is strongest in CI/CD because weak checks allow unreliable code to move downstream quickly.
Practical implication: shift security gates from syntax review to deterministic testing and policy checks in the delivery pipeline.
Why bring your own AI creates governance blind spots
When teams use multiple AI tools through personal accounts, the organisation loses standardisation, logging, and lifecycle control over the development assistant itself. That creates a fragmented toolchain where code may be generated outside approved environments, making it difficult to apply consistent policy, audit usage, or enforce secure defaults. This is not only a software governance issue. It also resembles an identity governance problem, because the account used to generate code becomes part of the trust boundary. Without inventory and control, the enterprise cannot reliably answer who used which AI service and where the output went.
Practical implication: inventory AI tool usage and bind access to managed corporate identities with auditability.
How security verification should absorb AI-generated output
Verification has to become a default control, not an optional cleanup step. In practice that means static analysis, policy checks, dependency review, and secure code review must sit inside the path from generation to merge. The reason is simple: AI can accelerate code creation faster than manual review can keep up, which means risk accumulates unless checks are automated and repeatable. This is closest to a control-plane problem in software governance. The control objective is not to stop AI use, but to ensure every generated change is subject to the same evidence-based scrutiny as human-written code.
Practical implication: embed automated verification into CI/CD so AI output is checked before it can become release-ready code.
NHI Mgmt Group analysis
AI-generated code has become a governance issue before it becomes a productivity issue. The survey data shows developers are worried about security exposure while organisations have not matched that concern with tighter controls. That gap matters because the risk is not only bad code, but unverified code entering release pipelines under a false assumption of safety. Practitioners should treat AI-assisted development as a control design problem, not a tooling preference.
BYOAI creates an identity and accountability problem inside engineering workflows. When 35% of usage happens through personal, ungoverned accounts, the organisation loses the ability to tie output to managed identities, approved services, and auditable policy. That weakens the same governance logic IAM teams rely on in other enterprise systems. The practical conclusion is that AI usage needs lifecycle control, not informal adoption.
Security debt is the right concept for AI-generated code risk. The article’s central warning is that plausible-looking output defers risk into later review, remediation, and incident response stages. That is how technical debt becomes security debt, and why the cost of verification rises once code is merged. Teams should measure AI use by the strength of their verification controls, not by generation speed.
Code security for AI-era development now depends on evidence, not confidence. A system that looks correct is not the same as a system that is secure, and that distinction is what current governance often misses. The discipline shift is toward provable checks, managed access, and continuous validation across the software lifecycle. Practitioners should optimise for verifiable trust in the pipeline, not trust in the model.
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.
- Only 44% of developers are reported to follow security best practices for secrets management, exposing a significant developer behaviour gap, according to the State of Secrets in AppSec.
- Read next: AI Security Platform Buyer's Guide
What this signals
The governance challenge is no longer limited to approving AI tools. Teams now need a control model that can prove which identities, accounts, and pipelines produced code, because ungoverned usage erodes both auditability and remediation discipline.
Security debt for AI-assisted development: the risk is not just defective code, but delayed discovery of defects that should have been caught before merge. That means security leaders should measure whether verification keeps pace with generation, not whether AI is being used at all.
For practitioners
- Implement deterministic verification in CI/CD Place static analysis, dependency scanning, policy checks, and secure code review gates between AI-assisted generation and merge approval.
- Inventory AI tools and account usage Identify every approved and unapproved AI coding tool, then map usage to managed corporate identities rather than personal accounts.
- Set governance rules for AI-generated code Define what code can be generated, what must be reviewed manually, and which sensitive repositories or data types are out of scope for external AI tools.
- Measure security debt created by AI output Track unresolved findings, post-merge rewrites, and vulnerability rework on AI-assisted changes to show whether verification is keeping pace with generation.
Key takeaways
- AI-assisted development is creating a verification gap, where code can look correct while still carrying security and reliability defects.
- Governance is weakened when developers use multiple AI tools through personal accounts because ownership, logging, and policy enforcement are lost.
- Automated checks inside CI/CD are the control that matters most when organisations want AI speed without turning faster output into faster exposure.
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 addresses the attack and risk surface, while NIST AI RMF, NIST CSF 2.0 and OWASP ASVS set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Ungoverned AI coding accounts and tool use create identity and privilege boundaries that can be abused. |
| Recommendation — Bind AI coding workflows to managed identities and review every privilege granted to development assistants. | ||
| NIST AI RMF | GOVERN — AI Governance and Accountability | The article is fundamentally about governance lagging behind AI-assisted software creation. |
| Recommendation — Establish AI governance ownership, policies, and oversight for code-generation workflows. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | Personal AI accounts and unmanaged tooling weaken access control and authorization visibility. |
| Recommendation — Apply permission governance to every AI coding account and service used in the SDLC. | ||
| OWASP ASVS | V15 — Secure Coding and Architecture | The article centres on code quality and secure review of software before release. |
| Recommendation — Use secure coding requirements and verification gates to catch unsafe AI-generated logic before deployment. | ||
Key terms
- AI-assisted Code Generation: AI-assisted code generation is the practice of using a model to draft or modify source code for a developer. It can speed delivery, but it does not verify correctness, security, or compliance, so the output still needs the same review, testing, and change control as human-written code.
- Security Debt: Accumulated risk that builds when vulnerabilities, unsafe dependencies, and policy gaps are left unresolved across the software lifecycle. In AI-assisted development, security debt grows quickly because more code is produced, more decisions are made automatically, and remediation often lags behind delivery.
- Bring Your Own AI: Bring Your Own AI describes employees using personal or self-selected AI tools for work rather than relying only on corporate offerings. The pattern matters because it fragments oversight, complicates data handling, and weakens the organisation’s ability to enforce consistent security and compliance controls.
Deepen your knowledge
NHI Mgmt Group covers identity security, NHI governance, and agentic AI through independent research, practitioner guides, and the NHI Foundation Level course. It helps security and identity practitioners translate governance concepts into operating controls across modern enterprise environments.
Published by the NHIMG editorial team on August 20, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org