Container security
Docker Security Audit Fixes
Daemon exposure, container privileges, images, volumes and limits.
These are the fixes for a Docker security audit: who can reach the daemon, how much of the host each container can touch, what is inside the images you run, and what stops one container taking down the rest.
- Checks documented
- 39
- Audits in this category
- 6
- Need root or sudo
- 31
- Rated high severity
- 13
For what these audits cover rather than how to fix them, see the Docker security checklist, or how the CtrlOps Security Audit runs.
By audit
6 audits, 39 checks
Grouped by the 6 audits they belong to. Daemon and socket comes first, because access to the Docker socket is root on the host by another name.
How much of this is serious?
13 high, 15 medium and 11 low severity checks- 01Daemon & SocketDaemon socket exposure, group access, log level and rootless mode8 fixes · 3 need root2 high, 2 medium and 4 low severity checks
- 02Image VulnerabilitiesContainer image CVEs, secrets, configuration and supply-chain hygiene8 fixes · 6 need root3 high, 3 medium and 2 low severity checks
- 03Volume PermissionsDocker volume mount safety, permissions and ownership7 fixes · 7 need root2 high, 4 medium and 1 low severity checks
- 04Runtime & ResourcesSeccomp, AppArmor/SELinux and memory, CPU, PID and restart limits6 fixes · 6 need root0 high, 3 medium and 3 low severity checks
- 05Container HardeningPrivileged mode, user, capabilities, privilege escalation and mounts5 fixes · 5 need root3 high, 1 medium and 1 low severity checks
- 06Network & Supply ChainPort publishing, inter-container connectivity, secrets, updates and images5 fixes · 4 need root3 high, 2 medium and 0 low severity checks
Fix these first
The highest-severity findings in Docker
Ordered by the impact class the audit script assigns, then by the order the audit runs them.
- Severity: HIGHNo root neededDocker TCP SocketCheck whether the Docker daemon is exposed over an unauthenticated TCP socketDaemon & Socket auditCan return FAIL · WARN · SKIP · PASS
- Severity: HIGHNeeds rootDocker Socket In ContainersCheck whether any running container has docker.sock mounted, granting host rootDaemon & Socket auditCan return FAIL · SKIP · PASS
- Severity: HIGHNeeds rootImage Vulnerability ScanScans local Docker images for known CVEs using trivy (or reports if no scanner is available)Image Vulnerabilities auditCan return FAIL · WARN · SKIP · PASS
- Severity: HIGHNeeds rootImage Secrets ScanScans image layers/build history for embedded credentials and secretsImage Vulnerabilities auditCan return FAIL · WARN · SKIP · PASS
- Severity: HIGHNeeds rootEnd-of-Life Base ImageFlags known end-of-life or soon-to-be-EOL base image tagsImage Vulnerabilities auditCan return FAIL · SKIP · PASS
- Severity: HIGHNeeds rootSensitive Host Path MountsChecks for containers bind-mounting sensitive host paths (/, /etc, /root, /proc, /sys, docker.sock, /var/lib/docker, /home)Volume Permissions auditCan return FAIL · SKIP · PASS
What these fixes cover
- Daemon TCP exposure, docker group membership, rootless mode and user namespace remapping
- Privileged containers, capabilities, no-new-privileges, container user and read-only roots
- Image vulnerabilities, floating tags, baked-in secrets, EOL base images and SBOMs
- Host path mounts, volume permissions and memory, CPU and PID limits
What they do not
- Kubernetes. These checks read a Docker daemon on the host; a cluster needs a different tool.
- Podman. It is recognised so the audit can tell you Docker is absent, but it is not itself audited.
- Stopped containers, for most checks. Only the volume checks look beyond docker ps.
Keep going
The other three platforms
Most hosts run more than one of these. The split shows how much of each platform the audit rates as high severity.
Either Docker is not installed, or the daemon could not be reached by the account running the audit. Unlike the other categories, sudo is not the only route here: membership of the docker group also works. Run usermod -aG docker <user> and log in again, or run the audit as root.
Not always, and the pages say which. Most container checks read running containers only (docker ps), so a stopped container is not evaluated. Several image checks examine only the first 5 or 10 local images, which means a host with many images is sampled rather than fully scanned.
Yes. Any process that can write to /var/run/docker.sock can start a container that mounts the host root filesystem and gain root on the host, in about three commands. It is the single highest-impact finding in this category, and the same reasoning applies to membership of the docker group and to an unauthenticated daemon on port 2375.
Yes. Where a fix is a docker run flag, the page gives the Compose equivalent alongside it, because almost nobody applies these one container at a time in production.
Stop juggling tools. Start managing fleets.
One app. All your servers. No context switching. Free to start, free to leave.
Start instantly · No credit card · Cancel anytime