Docker
TMA-DOCKER-NO-PRIVILEGED
Ensure no running container is privileged
CriticalLevel 1Automateddocker
Description
Privileged containers have nearly full host access.
How it is checked
Audit method: Shell command
shell
ids=$(docker ps -q) || exit 1; [ -z "$ids" ] && { echo 0; exit 0; }; out=$(docker inspect --format '{{.HostConfig.Privileged}}' $ids) || exit 1; printf '%s\n' "$out" | grep -c true || true- Expected output
0
How it is fixed
Fix method: Guidance or infrastructure patch
Remove 'privileged: true' from the container/compose/Kubernetes spec and redeploy
Properties
- Operating systems
- Any
- Tags
- dockercontainers
- Reference
- CIS Docker Benchmark - Container runtime
Check this host
Run this on a machine you are allowed to audit. The scan is read-only.
shell
tmaegis scan --target docker