For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/kubernetes-shared-host-pid-namespace.md.
A documentation index is available at /llms.txt.
Containers should not share the host process ID namespace. If a Pod’s spec.hostPID is set to true, its containers run in the host’s PID namespace and can observe or interact with host processes, increasing the risk of privilege escalation and interference. This rule flags resources where spec.hostPID is true; the field should be false or undefined.