Mounting Docker socket (Unix socket) enables container to access Docker internals, retrieve sensitive information and execute Docker commands, if Docker runtime is available.
- Not Configurable
- CronJob
- DaemonSet
- Deployment
- Job
- Pod
- ReplicaSet
- StatefulSet
This Policy checks if hostPath.path
is set to /var/run/docker.sock
or /var/lib/docker
. If so,the resource will have access to docker internals. Therefore, the resource is denied from being deployed in the cluster.