Use external secret stores when a policy action depends on a sensitive string that must be reused, rotated, or centrally governed. This is especially useful for authentication and verification workflows where the same credential may appear in multiple places. Runtime references let the policy stay clean while the authoritative secret remains in the external system.
Why This Matters for Security Teams
Static values are simple until they are copied into code, pipelines, policy files, or agent workflows and then forgotten. At that point, the credential becomes a long-lived control plane asset rather than a managed secret. NHIMG data shows that 79% of organisations have experienced secrets leaks, with 77% causing tangible damage, which is why the question is not whether a secret should exist, but where its authoritative copy should live. The Ultimate Guide to NHIs — Static vs Dynamic Secrets frames this as a lifecycle problem, not just a storage problem.
External secret stores with runtime references matter when the same sensitive value must be reused while remaining centrally governed. That pattern reduces duplication, improves rotation, and keeps policies readable. It also aligns with the OWASP Non-Human Identity Top 10, which treats secret exposure and weak lifecycle control as core NHI risks. In practice, many security teams discover the risk only after a CI/CD token, API key, or service account secret has already propagated across multiple systems.
How It Works in Practice
Runtime references mean the policy or application does not embed the secret value itself. Instead, it stores a pointer, handle, or secret ID that is resolved at execution time from a vault or external secret manager. This is useful when the same credential must be consumed in more than one place, but should still be rotated, audited, and revoked from a single source of truth. The authorisation boundary remains in the secret store, while the runtime consumer receives only what it needs for the task.
For operational teams, the practical pattern is usually:
- Store the authoritative secret in an external vault or managed secret store.
- Reference the secret by name, path, or identifier in policy, workflow, or application config.
- Resolve the value only at runtime, ideally with short TTLs and scoped access.
- Log retrieval events without logging the secret itself.
- Rotate centrally so every consumer inherits the new value without manual copy-paste.
This approach is strongest when the secret is shared across services, verification steps, or automation tasks, and when human operators should not need direct access to the raw value. It is especially relevant for build systems and delivery pipelines, where secret duplication increases blast radius. NHIMG’s Guide to the Secret Sprawl Challenge and the CI/CD pipeline exploitation case study show how quickly embedded secrets spread once they leave the vault. Current guidance also aligns with secret-management patterns described in the OWASP NHI project and the runtime control principles in CISA Zero Trust Maturity Model.
These controls tend to break down in legacy environments where applications cannot resolve secrets dynamically, or where the runtime path has no secure network reachability to the vault.
Common Variations and Edge Cases
Tighter secret centralisation often increases operational dependency on the vault and the identity path used to reach it, so organisations must balance reduced sprawl against availability and latency. That tradeoff is real, especially in distributed systems and edge deployments.
There is no universal standard for this yet, but current guidance suggests using runtime references for shared, rotated, or high-value secrets, and using static values only when the value is non-sensitive or the platform cannot support secure retrieval. For agentic workflows, the threshold is even lower because autonomous systems can chain tool calls, repeat actions unpredictably, and amplify exposure if a static credential is embedded. In those cases, runtime retrieval plus ephemeral access is safer than baking secrets into prompts, policies, or orchestration templates. The NHI lifecycle lessons in the 52 NHI Breaches Analysis and the 230M AWS environment compromise reinforce that static secret tend to fail at scale because they outlive the context they were created for.
Teams should avoid runtime references when the secret is so tightly coupled to startup-time bootstrapping that retrieval failure would prevent the system from coming online. Even then, the better pattern is usually to use a bootstrap identity with minimal privileges, then exchange it for a short-lived operational secret.
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 CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Runtime references reduce static secret exposure and support rotation. |
| OWASP Agentic AI Top 10 | A-03 | Agents should not carry static secrets that can be reused across tool chains. |
| CSA MAESTRO | ID-2 | MAESTRO emphasizes identity and secret governance for autonomous workloads. |
| NIST AI RMF | AI RMF supports governance over runtime access and secret handling in AI systems. | |
| NIST CSF 2.0 | PR.AC-4 | Least-privilege access to secrets aligns with controlled runtime retrieval. |
Issue short-lived, task-scoped credentials and resolve secrets only when a tool call requires them.
Related resources from NHI Mgmt Group
- When should organisations use semantic routing instead of static task tags?
- Why do organisations need runtime visibility for AI identities instead of relying only on static configuration data?
- What breaks when organisations only scan for exposed credentials instead of governing the full lifecycle of machine identities?
- What is the difference between runtime protection and NHI lifecycle management?