Odiambo essay · AI security

Security Debt in AI Transformations: The Hidden Cost of Moving Blindly

How insecure code, shadow AI, supply chain weaknesses, and delayed governance accumulate, and how to make remediation part of everyday delivery.

An AI agent can help build an application in days. A missing permission boundary can put its data at risk in seconds.

In July 2025, Replit's coding agent deleted data from an application database belonging to SaaStr co-founder Jason Lemkin. In its account of the incident, Replit acknowledged that development changes could affect the production application. The company said Lemkin ultimately restored the database without data loss and described new safeguards separating development and production databases by default. Replit's incident account and response.

Viewed through the lens of security debt, the lesson is clear: connecting an agent to consequential systems creates obligations that cannot be satisfied by a well-written instruction alone. Permissions, environment isolation, recovery procedures, and accountable ownership must support the integration from the outset. Recovery can repair the immediate damage; it does not make the missing boundary acceptable.

This is the challenge of security debt in AI transformations. Faster development can accumulate insecure code, shadow AI, inherited supply chain weaknesses, delayed governance, and overloaded security teams. This article examines those five sources of debt, then applies the ISACA cycle of identifying, assessing, measuring, managing, and monitoring debt to make remediation part of everyday delivery.

What is security debt in an AI transformation?

Security debt is the accumulated exposure and future remediation work created when necessary safeguards are deferred, incomplete, or absent. Some debt is knowingly accepted to meet a deadline. Some remains invisible because nobody has inventoried the integration or assigned responsibility for it.

AI can accelerate both forms. A coding assistant produces more changes to review. An autonomous agent connects those changes to tools, data, and business processes. A weakness that once affected a single function can spread through a shared template, dependency, or service identity.

The debt's "interest" is the additional effort and exposure created by delay: more affected systems, harder migrations, longer investigations, and increasing demands on already stretched teams. That is why AI governance belongs inside the transformation budget and delivery plan.

Five ways AI security debt accumulates

1. Insecure code generated at scale

AI coding assistants such as GitHub Copilot can accelerate implementation, but generated code still needs security review. SQL queries built from untrusted strings, unsafe dependency choices, and missing authorization checks can become repeated patterns when suggestions are accepted without sufficient scrutiny.

There is evidence for the overconfidence problem. A study published at ACM CCS in 2023 found that participants using an assistant based on an earlier Codex model produced less secure code overall and were more likely to believe their code was secure. This is evidence from a particular model and study setting, not a vulnerability rate for today's Copilot or every AI coding tool. Perry and colleagues, Do Users Write More Insecure Code with AI Assistants?.

The operational risk arises when code generation grows faster than review capacity. Flawed suggestions can pass through hurried reviews and spread across services before anyone addresses the underlying pattern.

Reduce the debt: Require automated code, secret, and dependency checks before merging changes. Use parameterized database queries and approved libraries. Give human reviewers particular responsibility for authentication, authorization, and sensitive data flows. Passing a scanner is evidence of a check, not proof of security.

2. Shadow AI and compliance blind spots

Shadow AI appears when employees adopt tools or integrations outside the organization's approved processes. Uploading proprietary code or customer information to an unvetted service creates questions the organization may struggle to answer: What left the environment? Who can access it? How long is it retained? Which contractual obligations apply?

The governance debt extends beyond the upload. Unregistered accounts, undocumented connectors, and unowned workflows make subsequent review and incident response harder. Whether a particular use violates a legal or contractual obligation depends on the data, terms, and applicable requirements; unsanctioned use alone does not establish a violation.

Reduce the debt: Provide an accessible route to approved AI tools, define permitted data classes, and review vendor retention and access terms. Register integrations and their owners. Apply data loss prevention controls where appropriate and give employees a straightforward way to disclose existing usage. NIST's Generative AI Profile provides relevant guidance on privacy and governance risks. NIST AI 600-1.

3. Expansion of third-party and supply chain vulnerabilities

An AI application depends on more than its model. Libraries, pretrained model artifacts, external application programming interfaces (APIs), plugins, and orchestration components can each introduce weaknesses. Deferring dependency reviews allows inherited security debt to enter production through components the organization did not build.

OWASP identifies supply chain vulnerabilities as a major risk for large language model applications, including risks associated with third-party software and models. OWASP: Supply Chain.

Reduce the debt: Maintain an inventory of software and model dependencies, their origins, versions, and owners. Review provenance, pin approved versions, scan dependencies, and evaluate updates before promotion. Track permissions and data access for external services as carefully as package vulnerabilities. Assign someone to act when a supplier publishes a security advisory.

4. The innovation-first governance gap

Security debt often begins with an assumed temporary decision: launch the pilot now and formalize controls later. The exposure grows when that pilot acquires production data, broader permissions, or business-critical users while its original exemptions remain in place. At this point the sandbox is dirty.

For agentic AI security, the crucial question is what the system can execute. These concepts must be clearly defined and based on the actual action or behavior required for the task. OWASP describes excessive agency in terms of excessive functionality, permissions, or autonomy. An agent's ability to use a powerful tool should trigger an explicit authorization decision. OWASP: Excessive Agency.

Reduce the debt: Start with clear concepts of why you're implementing an agent in the first place. Then define allowed actions, named owners, and release conditions before production access. Zero trust has not gone anywhere. Enforce least privilege through identities and tool permissions. Separate development from production and require approval for consequential actions. Give exceptions an expiry date, compensating controls, and a person authorized to accept the residual risk.

5. Alert fatigue and resource burnout

Complex AI workloads can add model, application, identity, infrastructure, and tool-execution events to the security operations center (SOC). When several tools flag the same underlying weakness, raw finding counts can grow faster than the team's ability to investigate.

The resulting risk is operational: recurring low-value alerts compete with serious incidents, remediation queues age, and exhausted analysts have less time to investigate ambiguous signals. Treating security fixes as indefinitely deferrable work compounds this debt.

Reduce the debt: Group duplicate findings, connect alerts to affected assets and business impact, and prioritize credible attack paths. Reserve engineering capacity for remediation. Track overdue critical exposure and analyst workload alongside detection coverage. A quieter dashboard only represents progress if significant risks remain visible.

A practical cycle for assessing and mitigating security debt

The supplied ISACA image presents a continuous cycle: Identify, Assess, Measure, Manage, and Monitor. The applications below are Odiambo's practical interpretation for AI transformations.

ISACA security debt cycle showing Identify, Assess, Measure, Manage, and Monitor as connected stages.
Image credit: ISACA.

Identify: Make hidden obligations visible

Combine audits, vulnerability scans, inventories, and team interviews. Map each AI workflow's data sources, model providers, tool connections, permissions, and business owner. Include unofficial tools and pilots that have quietly become operational dependencies.

Create a security debt register that records the affected system, missing control, supporting evidence, potential impact, owner, and target resolution date. An inventory becomes useful when each finding leads to a decision.

Assess: Understand why the debt exists

Examine the choices that produced the weakness. Was production access granted for convenience? Did a release bypass review? Is responsibility split between a vendor and an internal team?

Assess likelihood, impact, exploitability, and the scope of possible damage. An agent able to modify customer records deserves different treatment from a tool restricted to public information. Document uncertainty and the risk that remains after existing controls are considered.

Measure: Track exposure and progress

Choose a small set of indicators with stable definitions and explicit scope:

IndicatorWhat it helps leaders see
Overdue critical findings, with age and affected systemsWhether the most serious known exposure is persisting
Percentage of inventoried production agents with reviewed permissions and named ownersCoverage of accountability and access review
Percentage of AI changes passing required checks before releaseWhether delivery controls are consistently applied
Time to remediate high-risk findingsWhether response capacity is keeping pace
Percentage of critical AI workflows with a successful, recent recovery testWhether recovery has been demonstrated

Use the inventoried population as the denominator and acknowledge discovery gaps. A rise in findings after better scanning can reflect improved visibility; interpret counts alongside severity, age, and control coverage.

Manage: Fund the fixes that protect business value

Prioritize work by the harm it can prevent. Remove unnecessary production permissions, restrict sensitive data flows, and repair exploitable weaknesses before spending scarce capacity on cosmetic improvements.

Assign each action an accountable owner, a deadline, and evidence required for closure. For example, closing an excessive-permission finding should include a test showing that the agent can complete its authorized task and cannot perform the prohibited action. Where remediation is deferred, record the reason, interim safeguards, and review date.

Monitor: Keep the cycle active

Review trends with engineering, security, and business owners. Reassess debt when models, dependencies, tools, data access, or autonomy change. Feed incidents and near misses back into release requirements and operating procedures. Do not rely on chain of thought and self-improvement loops.

This recurring approach is consistent with NIST's treatment of AI risk management across the system lifecycle. NIST's own framework uses Govern, Map, Measure, and Manage; it is distinct from the five-stage ISACA image used here. NIST AI Risk Management Framework.

Make security part of the transformation's definition of done

Start with one consequential AI workflow. Trace what it can read, change, and trigger. Record the missing controls, select the highest-impact fixes, and give their owners delivery capacity. Review the evidence at the next release decision.

Reducing security debt requires governance to operate at the same pace as deployment: automated reviews in the development lifecycle, explicit data controls, bounded agent permissions, and clear accountability for exceptions.

Before the next AI launch, ask: What security obligation are we deferring, who owns it, and when will we know it has been resolved?

Clear concepts and early governance answer these questions and help set up AI transformations for success.

Engagement inquiry

Interested in solving your problems with Odiambo solutions?