Tokens and keys are the practical proof of trust in NHI and AI workflows. When attackers steal them, they can impersonate services, reuse gateway access, or bypass trust checks without changing the underlying password policy. That is why secret storage, rotation, and scope control matter as much as endpoint hardening.
Why This Matters for Security Teams
Compromised tokens and keys are not just “stolen credentials.” In NHI and AI tooling, they are the thing that proves the workload is allowed to act, so theft often looks like legitimate activity. That is why incidents can move from a single leaked secret to broad data access, tool chaining, or silent privilege reuse before traditional alerts trigger. The problem is especially acute when secrets live in tickets, chat, code, or CI/CD systems, where exposure is easy to miss.
NHIMG’s research on the 2025 State of NHIs and Secrets in Cybersecurity found that 44% of NHI tokens are exposed in the wild, and 91% of former employee tokens remain active after offboarding. That gap matters because attackers do not need to break the underlying application when the trust artifact itself is reusable. The practical lesson is reinforced by 52 NHI Breaches Analysis, where token misuse repeatedly shows how quickly one exposed secret becomes multiple trust failures.
In practice, many security teams encounter the blast radius only after the token has already been replayed across multiple services, rather than through intentional secret discovery.
How It Works in Practice
Tokens and keys matter because they are the operational shortcut that replaces human presence. In service-to-service workflows, API keys, OAuth tokens, certificates, and short-lived session tokens all act as cryptographic proof that a workload can authenticate and do work. For AI tooling and agents, the stakes are higher because the workload may chain tools, call internal APIs, or request new permissions at runtime. If a token is compromised, the attacker can inherit the same access path without changing the password policy or defeating MFA.
Current guidance suggests treating these secrets as high-value workload identity artifacts, not simple configuration data. That means scope limiting, short TTLs, rotation, and revocation should be designed around the task, not the application release cycle. Secrets should be issued just in time, stored in dedicated secret managers, and bound to the smallest feasible audience. For agentic systems, runtime authorisation should be evaluated per request using policy-as-code, because static role assignments cannot fully predict what an autonomous agent may try next. This is why the emerging pattern combines workload identity, such as SPIFFE or OIDC-based attestation, with ephemeral tokens and contextual policy checks.
Practical examples are visible in incidents such as the Salesloft OAuth token breach, where stolen tokens enabled access without a password reset, and in the Anthropic report on AI-orchestrated cyber espionage, which underscores how autonomous workflows can amplify stolen access at machine speed.
- Use short-lived tokens for each task, not long-lived shared credentials.
- Bind secrets to a workload identity and revoke them automatically after use.
- Separate human admin access from agent execution access.
- Monitor for reuse across chat, tickets, code, and CI/CD pipelines.
These controls tend to break down in distributed CI/CD environments with legacy service accounts because static secrets are often embedded in automation that cannot yet support per-task issuance.
Common Variations and Edge Cases
Tighter secret controls often increase operational overhead, so organisations have to balance blast-radius reduction against deployment friction and availability requirements. That tradeoff is real, especially where legacy applications, third-party integrations, or air-gapped systems cannot easily support ephemeral credentials. Current guidance suggests that not every secret can be eliminated immediately, but long-lived secrets should be treated as a temporary exception with compensating controls.
One common edge case is shared platform credentials used across multiple applications. NHIMG notes in its Ultimate Guide to NHIs that 60% of NHIs are overused, which means one compromised token may expose several workloads at once. Another is AI tooling that requests data from multiple internal systems in sequence. If the agent can pivot with the same credential set, a single secret leak becomes lateral movement. The Guide to the Secret Sprawl Challenge is useful here because it highlights how duplication, shadow storage, and inconsistent rotation create hidden reuse paths.
There is no universal standard for this yet, but best practice is evolving toward workload-bound, short-lived, and policy-checked access for every system that can support it. Where that is not possible, teams should narrow scope, monitor reuse, and aggressively retire the secret path as part of the remediation plan.
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, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF 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 | Addresses secret rotation and lifecycle weaknesses that make compromise so damaging. |
| OWASP Agentic AI Top 10 | A2 | Agent tool access becomes dangerous when stolen tokens let an agent act beyond intent. |
| CSA MAESTRO | IA-2 | MAESTRO covers identity and authorization for autonomous workloads using secrets. |
| NIST AI RMF | GOVERN | AI risk governance requires accountability for stolen credentials in autonomous systems. |
| NIST Zero Trust (SP 800-207) | SC-2 | Zero trust requires continuous verification even when a token appears valid. |
Treat agent tokens as workload identity and enforce short-lived, revocable credentials.