What's inside the image isn't how it's run.
Trivy audits an image's contents. Docker Bench for Security audits the Docker daemon and how a container is actually launched — a distinct, equally real risk surface.
privileged: true
Disables nearly every isolation control from the last slide in one flag — capabilities, device access, seccomp confinement.
pid: host
The container's processes can see and signal every process on the host, not just its own tree.
/var/run/docker.sock mounted in
The single most dangerous of the three — see why below.
The Docker daemon usually runs as root. A container with the socket mounted in can ask that daemon to start a brand-new container with the host's filesystem bind-mounted and
--privileged set — one command, and it has an interactive root shell on the real host, not the container."Mounting the socket" and "giving that container root on the host" are the same sentence — this is the mechanism, not a vague warning.