Docker audit fixes
Runtime & Resources: fixing all 6 checks
The runtime audit reads each running container's HostConfig: the seccomp and AppArmor confinement that contains an escape, and the memory, CPU and PID caps that stop a container taking down the host.
All six checks print the same line, "No running containers to evaluate", whether the daemon was unreachable or the host simply had nothing running, so six skips do not tell you which of the two happened. The Docker Inventory check in the Daemon and Socket audit is what separates them.
Transcribed from the docker-security-runtime-resources audit script.
Find your finding
Listed in the order the audit runs them. Take the check name from the third field of the result line and open its page.
Seccomp Profile
SoonCheck whether any running container disables the default seccomp syscall filter
MediumNeeds root3 resultsContainer AppArmor/SELinux
SoonCheck whether AppArmor or SELinux confines running containers and is enforcing on the host
MediumNeeds root3 resultsMemory Limits
SoonCheck whether running containers have a memory limit set
MediumNeeds root3 resultsCPU Limits
SoonCheck whether running containers have a CPU limit set
LowNeeds root3 resultsPID Limits
SoonCheck whether running containers cap process count to contain fork bombs
LowNeeds root3 resultsContainer Restart Policy
SoonCheck whether any container uses an unbounded always restart policy
LowNeeds root3 results
How the Runtime & Resources audit reads your server
Every check in this audit runs after the same preamble, and several of its results only make sense once you know what that preamble could and could not see.
Running containers only.
Docker detection: DOCK=direct if docker ps works as the audit user (docker group), DOCK=root if it works through sudo; the dk helper wraps docker accordingly. IDS is the list of running container IDs and NRUN their count; dk inspect --format is used with Go templates. Podman is recognised but not audited.
A SKIP is never a pass
A skipped check verified nothing at all. The most common cause is privilege: 6 of the 6 checks in this audit need root for a complete result. Before every run, each script works out which of four privilege modes it is in.
| Mode | How it is reached | What it means for your results |
|---|---|---|
root | The audit runs as UID 0. | Every privileged branch runs directly. No check skips for lack of permission. |
nopass | sudo -n true succeeds, so the account has passwordless sudo. | Privileged commands run through sudo -n. |
pass | A sudo password was supplied in the CtrlOps audit settings and accepted. | Privileged commands run through sudo -S. |
none | None of the above worked. | CAN_ROOT=0. Every privileged branch returns SKIP with a "Need root" message rather than guessing. |
If many checks skip with a “need root” message, run the audit as root, grant the audit account sudo (with or without NOPASSWD), or supply the sudo password in the CtrlOps audit settings. For Docker checks, membership of the docker group is an alternative to sudo: run usermod -aG docker <user> and log in again.
Runtime & Resources questions
Run all 6 Runtime & Resources checks, in one click
CtrlOps runs this audit over your existing SSH connection - no agents, no scripts to manage. $7/user/month after a 1 month free trial - no credit card required.
✓ Start instantly·✓ No credit card·✓ No sneaky autorenewals