TL;DR: Machine identities now outnumber human users by more than 80 to 1, while only 15% of organisations feel highly confident preventing NHI attacks and 69% remain concerned, according to Apono. Static credentials, hardcoded secrets, and manual rotation leave a growing attack surface that traditional vault models do not fully contain.
At a glance
What this is: This is Apono's guide to why secret sprawl, hardcoded credentials, and weak rotation are widening NHI risk.
Why it matters: It matters because IAM and PAM teams need to govern machine credentials as lifecycle assets, not as static configuration details that can be left to drift.
By the numbers:
- Machine identities now outnumber human users by more than 80 to 1 in modern enterprises.
- Only 15% of organizations feel highly confident in preventing NHI attacks.
- 69% of organizations express concerns about NHI attacks.
Context
Secrets management is the discipline of issuing, storing, rotating, and revoking credentials so machines can authenticate without turning every secret into standing access. In NHI programmes, the real failure is not the vault itself but the gap between how credentials are created and how long they remain usable.
Apono's article argues that machine identity sprawl now outpaces manual control because credentials are scattered across repositories, pipelines, containers, and cloud variables. That makes ownership, scope, and expiry the governance problem, not just the storage location.
For IAM and PAM teams, the practical question is whether secrets are treated as lifecycle-managed access grants or as configuration artefacts that linger after the workload, branch, or deployment has moved on.
Key questions
Q: What breaks when NHI secrets are stored in code or CI/CD systems?
A: You lose the containment boundary. A single exposed secret can be copied into build logs, deployment tools, developer machines, and downstream environments, which makes revocation slower and incident scope much wider. Vaulting is meant to prevent exactly that replication problem by controlling where secrets can live and who can retrieve them.
Q: Why do long-lived machine credentials create more risk than short-lived access?
A: Long-lived machine credentials create more risk because they can be copied, reused, and forgotten across pipelines and infrastructure. Short-lived access reduces exposure, but only if it is tied to policy, ownership, and revocation at the point of use. Without that, the credential may still outlive the system or workload it was meant to protect.
Q: When do secrets managers fall short for NHI governance?
A: Secrets managers fall short when teams treat storage as the control, not the delivery decision. If the system cannot verify the workload, enforce conditional access, or revoke access quickly, the organisation may store secrets safely while still exposing them to the wrong identity.
Q: When should organisations move from service accounts to workload identities?
A: They should move when an account is used for unattended cloud operations, scripted administration, or infrastructure provisioning. In those cases, managed identities or service principals usually fit the execution model better because they avoid human sign-in assumptions and reduce the chance that MFA policy will disrupt business operations.
Technical breakdown
Why static secrets create NHI sprawl
Static secrets become an identity problem the moment they are copied into code, scripts, variables, and deployment files. Each copy increases the chance that a credential will outlive its intended use, especially when service accounts and pipelines share access patterns across environments. In NHI terms, the issue is not only exposure but persistence: a token that is never rediscovered will never be revoked. This is why secret sprawl is so hard to govern with human-centric review cycles or ad hoc vaulting alone.
Practical implication: Treat every static secret as a lifecycle object that needs discovery, ownership, scope, and expiry.
How rotation and expiry change the attack window
Rotation reduces the value of a leaked credential by limiting how long it can be reused, while expiry forces the identity relationship to be reissued rather than assumed indefinitely. In machine identity environments, the useful control is not merely vault storage but the combination of automatic renewal, scoped issuance, and time-bound access. That is especially important for CI/CD and automated workflows, where manual ticketing often leaves secrets in place far longer than intended. The technical objective is to make compromise less durable, not just less likely.
Practical implication: Use automated rotation and expiry so a leaked NHI credential cannot remain valid long enough to be operationally useful.
Why least privilege has to be workload-specific
Machine identities typically fail when one credential is allowed to serve too many systems, namespaces, or functions. The article's just enough privilege model is really a workload-specific access model: each identity should carry the smallest scope needed for one pipeline, one service, or one environment. That reduces lateral movement because a compromised secret no longer maps to broad shared access. It also sharpens accountability, because access logs can be tied to a narrower operational purpose rather than a generic shared account.
Practical implication: Assign workload-specific privileges instead of using shared service accounts or broadly scoped keys.
Threat narrative
Attacker objective: The attacker wants durable access through a credential that survives detection, rotation delays, and incomplete offboarding.
- Entry begins when hardcoded or forgotten secrets are exposed in repositories, scripts, or cloud variables, creating a reusable credential outside governance.
- Escalation follows when long-lived or overprivileged tokens remain valid after they should have been rotated or revoked, letting the attacker reuse them at scale.
- Impact occurs when the compromised secret opens access to production systems, data, or deployment paths that the credential was never meant to cover.
Breaches seen in the wild
- Dropbox Sign breach 2024: A compromised back-end service account gave attackers Dropbox Sign customer data, including API keys, OAuth tokens and MFA information.
- Salesloft OAuth token breach: hackers stole OAuth tokens to access Salesforce data via Salesloft.
Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Secrets management is now the control plane for NHI governance, not a supporting utility. When machine identities outnumber human users by orders of magnitude, the old assumption that credentials can be tracked manually collapses. The governance task becomes lifecycle control over every secret's owner, scope, and expiry, because that is where NHI access actually lives. Practitioners should stop treating vaulting as the whole answer and start treating it as one control in a broader NHI programme.
Hardcoded and shared credentials create identity blast radius, not just exposure risk. A secret embedded in code, scripts, or a shared account does more than leak access. It creates an access path that is difficult to attribute, hard to revoke cleanly, and easy to reuse across environments. The practical consequence is that privilege scope matters as much as secrecy, because one credential can become the pivot point for many workloads.
Automated rotation only works when expiry is enforced at issuance, not after discovery. Manual review models assume there is time to notice a bad secret before it is reused. In NHI environments, that assumption is weak because credentials are copied fast and forgotten faster. The field implication is that governance has to move left into issuance and renewal, where the secret is still governed rather than already in circulation.
Just enough privilege is the right concept because NHI access should map to function, not identity reuse. Shared service accounts and broadly scoped tokens blur the line between one workload and many. That makes audits unreliable and incident response slower because one credential no longer has a single operational owner. Practitioners should read this as a reminder that machine identity programmes fail when identity reuse is accepted as convenience.
Ephemeral credential trust debt: the longer a machine secret persists, the more governance debt it accrues. The article's core warning is not merely that secrets leak, but that unmanaged lifespan turns every secret into latent risk. The organisation that cannot explain where a credential lives, who owns it, and when it expires is carrying unresolved trust debt that will surface during the next incident or audit.
From our research library:
- 28.65 million new hardcoded secrets were detected in public GitHub commits in 2025 alone, a 34% year-over-year increase and the largest single-year jump ever recorded, according to the State of Secrets Sprawl 2026.
- Only 44% of organisations are currently using a dedicated secrets management system, according to the 2024 State of Secrets Management Survey.
- Read next: Guide to NHI Rotation Challenges
What this signals
Secret lifecycle control is the real boundary of NHI governance: if a credential can be created, copied, and reused without a clear owner or expiry, then the programme has not actually controlled the identity, only the storage location. This is why NHI teams need to map secrets to ownership and revocation, not just vault placement.
Machine identities can multiply faster than manual processes can track them, which is why visibility has to move from periodic review to continuous inventory and usage monitoring. A single overlooked credential can still become the highest-risk access path in the environment.
The governance shift is from asking whether a vault exists to asking whether every secret has a bounded lifetime and a workload-specific purpose. That is the difference between containing NHI sprawl and merely cataloguing it.
For practitioners
- Discover and classify every machine secret Inventory API keys, tokens, service accounts, and workflow credentials across repositories, pipelines, cloud variables, and containers. Assign each secret an owner, purpose, environment, and expiry path, then revoke anything with no active use or accountable owner.
- Replace static credentials with automatic expiry Move from manually rotated long-lived credentials to time-bound secrets that expire on schedule or on event. Tie rotation to deployment and renewal workflows so expired access is removed without waiting for a ticket queue.
- Scope access to one workload or function Break shared service accounts apart and issue workload-specific identities for each pipeline, namespace, or service. Keep permissions narrow enough that compromise of one secret does not expose unrelated systems or production paths.
- Feed secret usage into monitoring and audit Send secret access logs into SIEM and review them for dormant, overprivileged, or unexpectedly reused credentials. Use those signals to catch drift between policy and actual machine access before it becomes a broader compromise.
Key takeaways
- Secrets management gaps widen machine identity risk when credentials are copied into code, pipelines, and cloud variables without clear ownership or expiry.
- The article links that risk to scale, noting that machine identities now outnumber human users by more than 80 to 1 and that confidence in stopping NHI attacks remains low.
- The practical control change is to govern secrets as lifecycle-managed access grants, with automatic rotation, narrow scope, and continuous audit coverage.
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 and MITRE ATT&CK address the attack and risk surface, while NIST SP 800-53 Rev 5 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | The article centres on exposed and hardcoded machine secrets. |
| NHI-05 — Overprivileged NHI | Shared and broadly scoped machine credentials are a major risk in the article. | |
| NHI-07 — Long-Lived Secrets | Long-lived tokens and manual rotation are core failures described by the article. | |
| Recommendation — Scan for exposed NHI secrets and revoke leaked credentials immediately. Reduce NHI blast radius by scoping each credential to one workload or function. Replace persistent machine secrets with short-lived credentials and automatic expiry. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | The article is fundamentally about managing the lifecycle of authenticators and secrets. |
| Recommendation — Apply IA-5 to enforce rotation, expiry, and revocation for machine authenticators. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | The article focuses on controlling entitlements attached to machine credentials. |
| Recommendation — Review NHI entitlements under PR.AA-05 and remove unnecessary access before it accumulates. | ||
| MITRE ATT&CK | TA0006;TA0008 — Credential Access; Lateral Movement | Leaked secrets and overprivileged accounts support credential abuse and lateral movement. |
| Recommendation — Map exposed machine credentials to TA0006 and TA0008 to prioritise containment. | ||
Key terms
- Secrets Management: The discipline of securely storing, distributing, rotating, and auditing secrets across an organisation's systems and pipelines, typically implemented via a centralised secrets vault such as HashiCorp Vault, AWS Secrets Manager, or Akeyless.
- 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.
- Secrets Sprawl: The uncontrolled proliferation of sensitive credentials, API keys, tokens, passwords, certificates, across codebases, cloud environments, CI/CD pipelines, and configuration files. In 2024, over 50 million leaked secrets were found on the dark web.
- Just enough privilege: Just enough privilege is the practice of granting only the access needed for a specific workload, task, or time window. For NHIs, it works best when privileges are tied to a single function and expire automatically, reducing the chance that a leaked credential can be reused broadly.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
Published by the NHIMG editorial team on June 24, 2026.
Updated on October 6, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org