November 23, 2026
Cybersecurity

Non-Human Identity Sprawl: Service Accounts, Bots, and Agents

Non-Human Identity Sprawl Service Accounts, Bots, and Agents

Machine identities now vastly outnumber human ones inside most organizations. Service accounts, API keys, OAuth tokens, and increasingly autonomous AI agents have multiplied faster than any team can govern them, and each one needs a scoped, auditable credential and a lifecycle owner or it becomes a standing, unmonitored attack surface.
MythReality
Non-human identities are a small, manageable slice of the identity estate.Non-human identities outnumber human identities by roughly 45 to 1 across typical enterprise environments, and by well over 100 to 1 in cloud-native environments specifically.
Rotating API keys occasionally is enough governance.Rotation without discovery, ownership, and scoping still leaves orphaned, over-privileged, and forgotten credentials that rotation schedules never reach in the first place.
AI agents are just another API key with extra steps.Agents create new credentials, request new permissions, and make autonomous decisions about what to access, at a pace and unpredictability that static API-key governance was never built to track.

Just How Big Is the Non-Human Identity Problem

The numbers involved are large enough that they change how a security team has to think about identity governance altogether. Non-human identities outnumber human identities at a ratio of roughly 144 to 1 in cloud-native environments, up sharply from 92 to 1 just a couple of years earlier, while the average across all enterprise environments, cloud and on-prem combined, sits closer to 45 to 1. In one published case study, an audit of a Fortune 500 financial institution reportedly found more than 4.2 million non-human identities against approximately 50,000 human user accounts — a ratio that would have seemed implausible a decade ago.

This is not simply a byproduct of cloud adoption. It reflects a structural shift in how software gets built: every microservice needs an identity to call every other microservice, every CI/CD pipeline step needs a credential to deploy, every SaaS integration needs an OAuth grant, and every monitoring, logging, and automation tool needs an API key. None of these individually looks dangerous. Collectively, they form an attack surface that is frequently larger, less visible, and less governed than the human identity estate that gets the majority of security attention and budget.

The Six Categories of Non-Human Identity

Non-human identity is not one thing, and treating it as a single category tends to produce governance that fits none of its parts well. Common types include service accounts, API keys, OAuth tokens, certificates, workload identities, and now AI agents, each with a distinct failure mode.

CategoryTypical Failure ModeWhy It Persists
Service accountsOverprivileged and never rotated after initial setupCreated once for a project, outlives the project, no owner left to review it
API keysHardcoded directly in application code or configurationFastest way to get something working; refactoring to a secrets manager is deprioritized
OAuth tokensLong-lived with scope creep beyond original grantUsers approve broad scopes without review; apps rarely request re-consent for narrower access
CertificatesUntracked expiry enables impersonation or unexpected outagesIssued by disparate systems with no central inventory of what expires when
Workload identitiesMisconfigured trust relationships allow lateral movementCloud IAM role trust policies are complex and rarely audited end-to-end
AI agentsMachine-speed identity and permission creation outpaces governance entirelyAgents provision their own credentials and request new scopes autonomously

Why AI Agents Are a Genuinely New Risk, Not Just More of the Same

As enterprises rapidly expand the use of APIs, workloads, containers, and autonomous AI agents, they face significant challenges in discovering, integrating, and governing non-human identities — and agents introduce a qualitatively different problem from the service accounts and API keys that came before them. A traditional service account is provisioned once, by a human, with a defined scope that changes rarely. An autonomous AI agent can request new tool access, spin up a subordinate agent with its own credentials, or chain together permissions across systems in ways that were never explicitly reviewed by anyone.

Agentic AI has created what some practitioners call an identity governance vacuum — a gap that traditional identity tools cannot track because they assume a relatively static relationship between an identity and its permissions. Systems that don’t just sit there but actively make decisions, shift permissions on the fly, and operate in ways that standard oversight tools cannot track are fundamentally at odds with an identity governance model built around periodic access reviews and quarterly certification campaigns. By the time a quarterly review happens, an active agent may have already created, used, and abandoned dozens of scoped credentials that no review process ever saw.

The scale of this shift shows up directly in credential-leak data. GitGuardian’s State of Secrets Sprawl research found 28.65 million hardcoded secrets added to public GitHub in a single year — a 34 percent year-over-year increase — with AI service-related secrets specifically surging 81 percent, reaching 1.27 million incidents. Agent development is generating exposed credentials faster than any previous wave of API-driven development did.

How an Autonomous Agent Multiplies Identity Surface

A single AI agent is deployed to handle customer support ticket triage. To do its job, it requests read access to the ticketing system, then write access to update ticket status, then an API key for a knowledge-base search tool, then a credential for a translation service, then permission to spawn a sub-agent to handle escalations. Within days, one deployed agent has generated five or six distinct credentials across systems, none of which existed before the agent was turned on, and none of which were individually reviewed by a human before being granted.

Discovery: You Cannot Govern What You Cannot See

Every non-human identity governance program has to start with discovery, because the honest starting point in most organizations is that nobody has a complete inventory of service accounts, API keys, and agent credentials in use. Discovery needs to span several distinct sources simultaneously: cloud IAM consoles across every provider in use, source code repositories (for hardcoded secrets), CI/CD pipeline configuration, SaaS admin consoles (for OAuth app grants), and increasingly, agent orchestration platforms and the credentials they issue to tools and sub-agents.

A useful discipline is treating discovery as continuous rather than a one-time audit. New service accounts and API keys get created constantly as part of normal engineering work, and a discovery process that runs once a year will always be months out of date by the time its findings are acted on. Continuous scanning of source repositories for hardcoded secrets, combined with a regular pull of every cloud provider’s IAM entity list, catches the steady drip of new identities that a point-in-time audit misses entirely.

Lifecycle Management: Ownership, Scoping, and Deprovisioning

Discovery alone does not fix anything; every discovered identity needs an assigned human owner, a documented purpose, a scope limited to that purpose, and a deprovisioning trigger tied to the lifecycle of whatever created it. When a project ends, its service accounts should end with it. When an employee who owns a personal API key leaves, that key needs rotation, not indefinite continuation under an orphaned owner field.

Scoping deserves particular attention because it is the difference between a compromised credential causing a contained incident and an enterprise-wide one. A service account created with broad permissions “to avoid future permission errors” is a standing liability from the moment it is created, regardless of whether it is ever compromised. Scoping to the minimum required permission set, even when it creates more initial friction for the engineer requesting it, pays for itself the first time any credential leaks.

Lifecycle StageWhat Should HappenCommon Failure
CreationAssign an owner, document purpose, scope to minimum required permissionsBroad permissions granted “to be safe,” no owner recorded
Active useMonitor usage patterns, flag anomalous access, rotate credentials on a scheduleNo monitoring baseline exists, so anomalies are invisible
Ownership changeReassign or rotate when the owning employee or project changesCredential silently becomes orphaned, no trigger to catch it
RetirementDeprovision immediately when the associated system or project endsCredential remains active indefinitely, discovered only in a later audit

Governing Agent Identities Specifically

Applying the same lifecycle discipline to AI agents requires a few additions that service account governance did not need. Giving agents their own distinct identity, rather than letting them inherit a developer’s or a service’s credentials, is the starting principle: an agent acting under its own scoped identity produces an audit trail that shows what the agent did, separate from what any human or parent service did. Agents that borrow a human’s credentials make incident investigation nearly impossible, since every action looks identical to that human’s own activity.

Beyond distinct identity, agent governance needs real-time policy enforcement rather than periodic review, because agents can request new permissions and spawn sub-agents faster than any human review cycle can keep pace with. This typically means wiring agent credential issuance into the same just-in-time, policy-engine-driven access model used for cloud-native privileged access, rather than treating agent permissions as a one-time setup decision. It also means capping how much permission an agent can request or grant to a sub-agent without explicit escalation to a human, since unconstrained delegation is how a narrowly scoped agent ends up indirectly holding broad access through a chain of sub-agents.

Common mistake

Letting an AI agent authenticate using a shared service account or a developer’s personal credentials instead of issuing it a distinct, scoped identity. This collapses the audit trail, makes it impossible to tell which actions were the agent’s versus the human’s, and means revoking the agent’s access requires revoking the underlying shared credential entirely, breaking anything else that depends on it.

What worked

Running a continuous, automated discovery scan across source repositories, cloud IAM consoles, and SaaS admin panels rather than an annual manual audit. Teams that moved to continuous discovery found and remediated orphaned credentials within days of creation instead of the many months a yearly audit cycle had previously left them exposed.

Building a Business Case for Investment

Non-human identity governance rarely wins budget on its own merits until a security leader can show what unmanaged sprawl actually costs. The most persuasive framing tends to compare two numbers directly: the count of discovered non-human identities against the percentage that have a documented owner and defined scope. A gap between a large discovered count and a small owned-and-scoped count is a concrete, board-legible statement of risk that a raw vulnerability count rarely achieves on its own, because it maps directly onto “how much of our attack surface has nobody watching it.”

Incident data reinforces the case further. Breaches that trace back to a leaked API key or an orphaned service account tend to have unusually long dwell times precisely because nobody owned the credential and therefore nobody was positioned to notice anomalous use of it. Framing non-human identity governance as a dwell-time reduction investment, rather than purely a preventive control, tends to land better with leadership that has already seen identity-related incident reports citing “credential had been active and unmonitored for” some multi-month figure.

A practical starting metric set for a business case includes: total discovered non-human identities, percentage with an assigned owner, percentage scoped to minimum necessary permissions, percentage rotated or reviewed within the last quarter, and — specifically for agent identities — percentage operating under their own distinct credential rather than a borrowed or shared one. Presenting these five figures together, updated quarterly, tends to make the case for continued investment without requiring a security leader to explain the underlying technology in detail.

Frequently Overlooked Elements

  • Sub-agent credential sprawlAn agent spawning its own sub-agents can generate a chain of credentials that no single review captures unless the orchestration platform logs the full delegation tree.
  • Hardcoded secrets in AI training and prompt dataCredentials embedded in prompts, fine-tuning datasets, or agent memory stores are a newer leak vector that traditional code-scanning tools were not built to catch.
  • Certificate expiry as an outage risk, not just a security riskAn expired certificate on a machine identity often causes an unplanned outage before anyone frames it as a security gap, so certificate inventories need operational as well as security ownership.
  • Cross-team ownership gapsA service account created jointly by two teams for a shared integration often has no single accountable owner once either team reorganizes.
  • Third-party SaaS OAuth grantsEmployees connecting personal or departmental SaaS tools via OAuth create machine-to-machine trust relationships that central IT frequently does not know exist.
  • Metrics beyond raw identity countTracking the number of non-human identities discovered without also tracking the percentage with an assigned owner and a defined scope measures visibility, not actual governance maturity.

Glossary

Non-Human Identity (NHI)
A machine identity such as a service account, API key, certificate, or workload identity that authenticates on behalf of software rather than a person.
Service Account
An identity created for an application, script, or automated process to authenticate and access resources, typically provisioned once by a human administrator.
OAuth Token
A credential issued through the OAuth authorization framework that grants a third-party application scoped access to a user’s or organization’s resources.
Workload Identity
An identity assigned to a running compute workload, such as a container or cloud function, allowing it to authenticate to other services without a stored static secret.
Secret Sprawl
The uncontrolled proliferation of hardcoded credentials, API keys, and tokens across code repositories, configuration files, and infrastructure.
Agentic AI
AI systems that autonomously make decisions and take actions, including requesting permissions and provisioning their own credentials, rather than only responding to direct prompts.

Key Takeaways

  • Non-human identities outnumber human ones by roughly 45 to 1 across typical enterprises, and far higher in cloud-native environments specifically.
  • Service accounts, API keys, OAuth tokens, certificates, workload identities, and AI agents each have distinct failure modes that require distinct governance approaches.
  • AI agents introduce a genuinely new risk because they request permissions and spawn sub-agents autonomously, faster than periodic human review can track.
  • Discovery must be continuous, spanning cloud IAM consoles, source repositories, and SaaS admin panels, not a once-a-year audit.
  • Every non-human identity needs an assigned owner, documented purpose, minimum-necessary scope, and a deprovisioning trigger tied to its parent project or system.
  • Agents should receive their own distinct, scoped identity rather than inheriting a human’s or a service’s credentials, to preserve a usable audit trail.
  • Governance maturity should be measured by the percentage of identities with an assigned owner and defined scope, not merely by how many identities have been discovered.

FAQs

How many non-human identities does a typical organization actually have?

Non-human identities outnumber human identities by roughly 45 to 1 across typical enterprise environments on average, and by well over 100 to 1 in cloud-native environments specifically, with some large enterprises reporting millions of machine identities against tens of thousands of human accounts.

What are the main categories of non-human identity?

The six commonly cited categories are service accounts, API keys, OAuth tokens, certificates, workload identities, and AI agents, each with a distinct typical failure mode ranging from hardcoded secrets to untracked certificate expiry to autonomous permission requests.

Why are AI agents considered a new category of risk rather than just another API key?

AI agents create new credentials, request new tool permissions, and can spawn sub-agents with their own credentials autonomously, at a pace and unpredictability that static, periodically reviewed API-key governance was never designed to track.

What is secret sprawl and why is it growing?

Secret sprawl is the uncontrolled proliferation of hardcoded credentials across code repositories and configuration. It is growing sharply alongside AI service adoption, with AI-related secret leaks on public code repositories increasing significantly faster than overall secret leaks in recent research.

Should discovery of non-human identities be a one-time audit or continuous?

Continuous. New service accounts, API keys, and agent credentials are created constantly as part of normal engineering work, so a once-a-year audit is typically months out of date by the time its findings are acted on.

What is the biggest governance gap in most non-human identity programs?

Missing ownership. Many discovered identities have no assigned human owner, no documented purpose, and no deprovisioning trigger, which means they persist indefinitely even after the project or employee that created them is gone.

Should AI agents share credentials with the humans or services that deploy them?

No. Agents should receive their own distinct, scoped identity so that their actions are separately auditable. Sharing credentials collapses the audit trail and makes it impossible to distinguish an agent’s actions from a human’s during an investigation.

How should permission requests from autonomous agents be governed?

Through real-time, policy-engine-driven access rather than periodic review, with explicit caps on how much permission an agent can request or delegate to a sub-agent without human escalation, since unconstrained delegation chains are how narrow scopes quietly become broad access.

References

  • Non-Human Identity Access Management Market — Grand View Research
  • GitGuardian Report Identifies Non-Human Identity Sprawl as Primary Security Risk for Enterprise Infrastructure 2026 — NHI Mgmt Group
  • What Are Non-Human Identities? The Complete Guide to NHI Security — Obsidian Security
  • Non-Human Identity (NHI) for AI Agents: Security Guide — AI Buzz
  • Giving Agents Their Own Identity, Not Your Credentials — Digital Applied
  • Non-Human Identity Security: API Keys, Service Accounts, and Workload Credentials — isMalicious

For the detection layer that watches these machine identities alongside human ones, read identity threat detection and response explained. On the privileged-access model these credentials should follow, see privileged access management for cloud-native environments. For the broader architecture that non-human identity governance supports, read our 18-month plan for zero trust implementation. On managing access for people who are not full-time employees, see workforce identity for contractors, gig workers, and agents, and for the device-level trust that complements workload identity, read device identity and hardware-rooted trust.

    Lina Kovacs
    Lina earned a B.Sc. in Computer Science from Eötvös Loránd University and a postgraduate certificate in Cybersecurity from ETH Zurich. She started in security operations, chasing down privilege-escalation paths and strange east-west traffic in SaaS estates. From there, she moved into incident response for fintechs, running tabletop exercises and helping teams ship with fewer secrets in repos. Today she writes plainly about zero trust, passkey rollouts, SBOMs, and secure software supply chains, cutting through fearmongering to focus on habits that actually lower risk. Lina mentors women entering cyber, co-hosts privacy workshops for teens, and publishes checklists that busy engineers actually use. She’s a classical violinist, an avid train traveler who prefers night routes, and an amateur photographer collecting views from station platforms across Europe.

      Leave a Reply

      Your email address will not be published. Required fields are marked *