Kubernetes check
Pod declares a hostPath volume
Trigger condition
A Pod spec's volumes list contains at least one entry whose source is hostPath.
Evidence
States each declared hostPath volume's name and configured host path, in a stable (declaration) order. This is a Pod-spec-level setting, not per-container, so the finding is never attributed to a specific container.
Impact
A hostPath volume mounts a path from the node's own filesystem into the Pod. Depending on the specific path mounted and the permissions configured on the host, this can expose node files, directories, or sockets to the Pod -- including ones belonging to other workloads or the node itself.
Recommendation
Remove any hostPath volume declaration that is not actually used by a container, and for one that is, confirm a hostPath mount is the storage appropriate for this workload rather than a safer alternative (e.g. a PersistentVolumeClaim or emptyDir). For a Deployment-managed Pod, make the change in the Deployment's own Pod template and roll out the change. For a Pod managed by another controller, make the change in that workload's own source configuration and follow its normal update process; for a genuinely standalone Pod, update its own source manifest instead -- either way, a running Pod's volumes cannot be edited in place, so check workload availability before it is replaced. When a live Pod's declared volumes do not match what its Deployment's own template reports, check the Deployment's rollout status (an older replica may predate a template correction) and whether an admission-time mutation (e.g. a mutating webhook) altered that Pod independently of its template -- investigate through the owning controller or the responsible admission configuration rather than editing the Pod directly. Account for workload availability before replacing a Pod to apply a corrected setting.
Important limitations
This check collects only the volume name and configured host path. It never inspects whether any container actually mounts the volume, nor whether a mount is read-only -- an unused declaration and a read-only mount are both flagged identically to an actively used, writable one. It does not detect equivalent or partial host access achieved through other means, such as securityContext.privileged or hostNetwork/hostPID/hostIPC (K8S-SEC-001/K8S-SEC-002).