TL;DR: AI agents, MCP servers, and coding assistants are inheriting broad, long-lived credentials in SaaS environments, creating a faster path to breach than legacy identity hygiene, according to WorkOS. The real failure is not tool adoption but treating non-human principals like stable human identities, so blast-radius control becomes the decisive security variable.
At a glance
What this is: This is a practical analysis of how AI identities in SaaS stacks are expanding the attack surface through static secrets, broad scopes, and weak lifecycle controls.
Why it matters: It matters because the same governance patterns that manage service accounts, API keys, and workload identities now need to cover agents, MCP servers, and coding assistants without inflating privilege.
By the numbers:
- The same credential hygiene failures that turned the 2021 Codecov breach into a supply chain incident are now playing out with AI tooling, just faster and at greater scale.
- 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 WorkOS's analysis of AI identity blind spots in SaaS platform security
Context
AI identity is the set of service accounts, OAuth clients, API keys, and tokens that let agents, MCP servers, and coding assistants act inside enterprise systems. In SaaS platforms, the problem is that these non-human principals are often provisioned with broad permissions, long-lived secrets, and weak ownership discipline.
The security gap is not that AI tools exist, but that they are frequently wired into production with identities designed for convenience instead of containment. Once a leaked key or stale OAuth client is treated like a normal access artefact, IAM and lifecycle controls stop matching the way the system actually behaves.
Key questions
Q: How should security teams govern AI assistants that use service accounts in production?
A: Treat them as non-human identities with explicit ownership, narrow scope, and lifecycle controls. Give each assistant a dedicated account, remove shared secrets from files and laptops, and review access through the same joiner, mover, and leaver process used for other machine identities. The goal is to keep the assistant's access bounded to the task it actually performs.
Q: Why do long-lived API keys create more risk for AI tools than for humans?
A: AI tools can copy, reuse, or leak credentials at machine speed, so a key that survives for months becomes a standing access path rather than a temporary convenience. If the key also inherits broad human permissions, compromise can spread far beyond the intended workflow. Short-lived, task-scoped credentials reduce that blast radius.
Q: What do teams get wrong about MCP server credentials?
A: They often treat MCP secrets as ordinary configuration instead of a trust boundary. Once client credentials move into CI variables, .env files, or laptops, they become hard to track and easy to over-share. Teams should govern them like any other non-human identity and shorten the window in which they remain valid.
Q: How can organisations tell whether NHI access for AI tools is actually controlled?
A: Look for ownership, scope, rotation, and logging tied to each principal, not just a generic platform policy. If you cannot say who owns a service account, what it can reach, and when it was last reviewed, the control is not working. Principal-specific telemetry is the clearest signal that governance is real.
Technical breakdown
Service accounts for agents and the scope problem
A service account gives a non-human principal a stable identity, but stability becomes risk when the account is granted broad scopes and static secrets. In agent workflows, that account can read tickets, call internal APIs, or trigger actions on behalf of the platform. If the secret is stored in a config file or environment variable, compromise is usually silent until the account is abused. The architectural issue is that the identity outlives the task, so permissions accumulate while ownership fades.
Practical implication: assign each agent a dedicated service identity with narrow scopes and a clear owner.
OAuth client credentials and MCP server exposure
An MCP server is usually exposed as an OAuth client, which means its client_id and client_secret become the trust boundary for every downstream action. When those credentials are copied into CI variables, developer laptops, or deployment files, the trust model stretches far beyond the intended runtime. Unlike human sessions, there is often no visible re-authentication moment when the credential becomes stale or over-shared. That makes secret distribution and credential lifecycle the real architectural control points.
Practical implication: move MCP credentials out of static files and into short-lived, centrally governed token flows.
API keys in coding assistants and inherited privilege
Coding assistants are often given API keys that inherit the full permissions of the person who minted them. That shortcut makes integration fast, but it also collapses least privilege because the assistant rarely needs the same reach as the developer. The result is a non-human principal with access wider than its function, which creates a direct path from leaked key to broad system access. This is classic identity sprawl, just wrapped in a modern workflow.
Practical implication: issue task-scoped keys for assistants and separate human permissions from machine permissions.
Threat narrative
Attacker objective: The attacker wants durable non-human access that can be reused quietly to move through production systems and reach sensitive data or internal controls.
- Entry occurs when a static API key, OAuth client secret, or service-account credential leaks from a config file, CI variable, or developer workstation.
- Escalation follows when the compromised non-human principal has scopes broad enough to read data, invoke internal APIs, or act across multiple environments.
- Impact lands when the attacker uses the credential to access customer data, internal systems, or downstream services before the identity is rotated or revoked.
Breaches seen in the wild
- Dropbox Sign breach — compromised Dropbox Sign service account exposed API keys and OAuth tokens.
- Moltbook AI agent keys breach — Moltbook breach exposed 1.5M AI agent keys.
Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
AI identity is becoming an NHI governance problem before it becomes an AI governance problem. The article is describing service accounts, OAuth clients, and API keys, which are already familiar NHI constructs. What changes is the workload using them: agents, MCP servers, and coding assistants now move at software speed, so lifecycle drift and scope creep can spread faster than human IAM processes expect. Practitioners should treat these identities as governed machine principals, not as special-case AI exceptions.
Static credential trust is the named failure mode here. A secret in a config file, CI variable, or .env file was designed for a world where exposure windows were acceptable and review cycles could catch drift. That assumption fails when the actor is a non-human workflow that can leak, copy, or reuse credentials continuously. The implication is that ownership, scope, and rotation assumptions all need to be reevaluated around machine-paced execution.
Blast radius is the control variable that now matters most. The article correctly frames the goal as reducing damage when compromise happens, not assuming compromise can be eliminated. In OWASP-NHI terms, that means scope, visibility, and lifecycle controls are the real defence line. The practitioner takeaway is to measure how far a leaked credential can travel, not only whether it can be issued.
Directory-synced service identities are becoming the minimum viable governance layer. When AI tooling is provisioned outside the directory, deprovisioning and recertification break down the same way they do for orphaned service accounts. That is not a tooling issue, it is a governance model mismatch. Teams should stop treating AI access as side-channel configuration and start folding it into the same identity lifecycle that governs all non-human access.
Separate audit baselines for human and non-human activity are no longer optional. A service account or agent can generate volumes and patterns that look normal for machines but abnormal for people. Without principal-type-specific telemetry, security teams miss the difference between routine automation and credential abuse. The practical implication is a governance model that distinguishes human behaviour, NHI behaviour, and agent-mediated behaviour at the logging and alerting layer.
From our research:
- 98% of companies plan to deploy even more AI agents within the next 12 months, despite documented rogue behaviour in 80% of current deployments, according to AI Agents: The New Attack Surface report.
- Only 52% of companies can track and audit the data their AI agents access, leaving 48% with a complete blind spot for compliance and breach investigation.
- That visibility gap is why practitioners should pair agent governance with OWASP Agentic AI Top 10 to pressure-test scope, memory, and tool-use controls before deployment expands.
What this signals
Identity teams should expect AI tool sprawl to be governed like machine identity sprawl, not like a new class of human access. The practical shift is from user-centric review cycles to principal-centric lifecycle management, where ownership, expiry, and telemetry matter more than the interface the tool uses. Teams that already manage service accounts well will adapt faster than teams that still rely on manual exception handling.
AI identity is creating a new version of credential debt. Every static secret embedded in a .env file, CI variable, or developer laptop extends the period in which an attacker can reuse a leaked credential without friction. That means your roadmap should prioritise short-lived tokens, directory-backed ownership, and detective controls that differentiate human and non-human sessions.
With 98% of companies planning to deploy more AI agents within 12 months, per AI Agents: The New Attack Surface report, the governance gap will widen unless identity programmes treat agents as first-class principals. The immediate planning question is not whether to adopt AI tooling, but whether your access model can contain it once it is in production.
For practitioners
- Inventory every non-human principal Build a complete register of service accounts, OAuth clients, API keys, and agent identities. Record owner, system of use, privilege scope, and last review date so orphaned credentials do not disappear into configuration sprawl.
- Replace static secrets with short-lived credentials Move agents and MCP tools to tokens with narrow time-to-live and central issuance. Where feasible, use workload identity federation so the runtime exchanges attestation for a fresh token instead of storing a reusable secret.
- Scope each identity to one job Issue purpose-built permissions for a single repo, system, or workflow. Do not reuse a developer's full-access token for automation, and do not let an agent inherit broader access than the task requires.
- Route service identities through the directory Treat AI and tooling identities as first-class directory objects so joiner, mover, and leaver processes apply to them. When a developer or workload is retired, the attached non-human access should be removed through the same governance path.
- Split telemetry by principal type Create separate thresholds and detections for human sessions, service accounts, and AI tooling. High-volume API activity may be normal for one principal type and a severe anomaly for another, so alerting must reflect the identity class.
Key takeaways
- AI assistants, MCP servers, and agents are creating the same governance problem that service accounts and API keys have always posed, only faster and at larger scale.
- The clearest risk signal is not adoption volume, but how long a credential can stay valid and how far it can move if exposed.
- Identity teams should tighten ownership, shorten credential lifetime, and separate machine telemetry from human telemetry before AI tooling spreads further.
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 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Static secrets and broad scopes are the core risk in this article. |
| NIST CSF 2.0 | PR.AC-4 | Least privilege and access lifecycle govern agent and service-account permissions. |
| NIST Zero Trust (SP 800-207) | PR.AC-1 | Non-human principals need continuous verification and narrow trust boundaries. |
Apply Zero Trust to AI identities by issuing access only when context and scope are explicitly verified.
Key terms
- Non-human identity: A non-human identity is any credentialed principal used by software rather than a person, including service accounts, API keys, OAuth clients, certificates, and tokens. In identity programmes, these principals need ownership, scope, lifecycle, and telemetry controls because they can act independently of a human user session.
- Service account: A service account is a machine identity used by applications, automation, or agents to access systems and APIs. It usually has a stable name and permissions that outlast a single task, which makes ownership, scope limitation, and deprovisioning critical when the account is tied to AI tooling.
- Short-lived credential: A short-lived credential is an access token or key that expires quickly and is issued on demand instead of being reused for months. For non-human identities, short lifetimes reduce the period in which a leaked secret can be exploited and make rotation less dependent on manual cleanup.
- Blast radius: Blast radius is the amount of damage an attacker can cause after one identity or secret is compromised. For non-human identities, it is determined by scope, environment reach, and how long the credential remains valid, making it a practical measure of whether access design actually contains failure.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are responsible for identity security strategy or NHI governance in your organisation, it is worth exploring.
This post draws on content published by WorkOS: AI identity is your next security blind spot. Read the original.
Published by the NHIMG editorial team on 2026-06-12.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org