Docker audit fixes
Image Vulnerabilities: fixing all 8 checks
The image audit inspects the images already pulled onto this host - their CVEs, embedded secrets, default user, base image age and signing - because a container is never safer than what was baked in.
Six of the eight checks ask the daemon for the local image list, so they report "Cannot query Docker daemon - run as root, with sudo, or as a docker group member" rather than a pass, and they skip a second way when the host has no local images at all. Image Signature Verification and SBOM Generation only look for binaries on PATH, so they still answer when the daemon is unreachable.
Transcribed from the docker-security-image-vulnerabilities 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.
Image Vulnerability Scan
SoonScans local Docker images for known CVEs using trivy (or reports if no scanner is available)
HighNeeds root4 resultsFloating Image Tags
SoonFlags images using the floating :latest tag instead of a pinned version/digest
MediumNeeds root3 resultsImage Secrets Scan
SoonScans image layers/build history for embedded credentials and secrets
HighNeeds root4 resultsImage Default User
SoonChecks whether images define a non-root USER
MediumNeeds root3 resultsImage Signature Verification
SoonChecks whether Docker Content Trust or cosign-based signature verification is in place
MediumNo root3 resultsEnd-of-Life Base Image
SoonFlags known end-of-life or soon-to-be-EOL base image tags
HighNeeds root3 resultsImage Build Best Practices
SoonRuns dockle if available, otherwise heuristically checks for HEALTHCHECK presence
LowNeeds root3 resultsSBOM Generation
SoonChecks whether an SBOM generator (syft, docker sbom, trivy) is available
LowNo root2 results
How the Image Vulnerabilities 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.
Most examine the first 5 or 10 local images (docker images | head -N), so large hosts are sampled, not fully scanned.
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 8 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.
Image Vulnerabilities questions
Run all 8 Image Vulnerabilities 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