A hostPath volume mounts a directory from the node filesystem into a pod. It is a powerful mechanism because it can expose the underlying host directly, so governance must focus on where the mount points and what directories the pod can touch, not only on pod privilege flags.
Expanded Definition
A hostPath volume is a Kubernetes storage primitive that mounts a path from the node filesystem into a pod, creating a direct bridge between container workload and host resources. In NHI governance terms, this matters because the workload may inherit access to files, sockets, device paths, or configuration artifacts that sit outside the pod boundary and outside ordinary secret management controls.
Definitions vary across vendors and platform guidance on how much hostPath should be permitted, but the operational distinction is clear: this is not just storage, it is host exposure. The risk is highest when a pod can read or write directories tied to credentials, runtime state, logs, or orchestration components. That makes hostPath relevant to identity material even when the pod itself has limited RBAC permissions. The NIST Cybersecurity Framework 2.0 remains useful for mapping this exposure to access control and asset governance outcomes.
The most common misapplication is treating hostPath like ordinary application storage, which occurs when teams mount broad node paths into workloads without reviewing what identity files, tokens, or sockets those paths expose.
Examples and Use Cases
Implementing hostPath rigorously often introduces deployment friction, requiring organisations to weigh host-level operational access against workload isolation and portability.
- A logging agent mounts a narrow host directory to read node log files, but the path must be constrained so the pod cannot discover adjacent credentials or kubelet artifacts.
- A backup job uses hostPath to collect node-local state, which is practical but requires explicit review of whether backup scope includes secrets, certificates, or API tokens.
- A security control pod mounts a socket or runtime directory for inspection, aligning with the need to observe host behaviour while preventing write access that could alter identity state.
- A platform team replaces hostPath with a more controlled pattern after discovering that an application pod could reach system directories unrelated to its function.
- For broader NHI governance context, the Ultimate Guide to NHIs explains why exposed service account material and overprivileged workloads often become linked in real incidents.
Where implementation patterns are still evolving, the safest interpretation is to treat every hostPath mount as a potential trust boundary crossing, especially when the mounted directory is writable or shared across containers.
Why It Matters in NHI Security
HostPath becomes a governance issue because NHI compromises frequently spread through paths that were never intended to hold secrets, tokens, or identity artifacts. Once a pod can reach the node filesystem, it may inherit visibility into mounted certificates, cached credentials, kubelet state, or adjacent operational files. That can turn a container-level incident into a node-level identity compromise.
This is why NHIMG emphasises visibility and privilege reduction across NHI estates: Ultimate Guide to NHIs reports that only 5.7% of organisations have full visibility into their service accounts, a gap that becomes more dangerous when host filesystem access is broad. The governance question is not simply whether the pod is privileged, but whether the mount path exposes identity material that should never be reachable from application code.
For implementation discipline, map hostPath usage to NIST Cybersecurity Framework 2.0 asset, access, and protective controls, then restrict mount scope to the minimum directory needed. Organisations typically encounter the consequences only after a pod breakout, credential theft, or node forensic review, at which point hostPath becomes operationally unavoidable to address.
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 | HostPath can expose node files containing NHI secrets and runtime artifacts. |
| NIST CSF 2.0 | PR.AC-3 | HostPath changes the effective trust boundary and requires strict access enforcement. |
| NIST Zero Trust (SP 800-207) | AC-4 | Zero Trust requires explicit control over lateral access from pods into host resources. |
Treat hostPath as a high-risk trust exception and enforce least-privilege mount policies.
Related resources from NHI Mgmt Group
- How should security teams prioritize sensitive data findings without relying on volume alone?
- What is the difference between alert volume and effective DLP monitoring?
- Why do build pipelines become riskier when AI increases code volume?
- Should organisations prioritise simulation clarity or campaign volume first?