For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/kubernetes-volume-mount-with-os-directory-write-permissions.md.
A documentation index is available at /llms.txt.
Containers can mount sensitive directories from the host, granting potentially dangerous access to critical host configurations and binaries.
This rule flags container volume mounts where the mountPath is a host-sensitive directory (for example /bin, /etc, /proc, or /) and the readOnly attribute is missing or set to false.
Such mounts are expected to be set to read-only to avoid modification of host files and reduce the risk of privilege escalation or system compromise.