Docker Security

Best Docker security scanners (2026)

There is no single Docker security scanner that covers every surface. Trivy, Grype, Docker Scout, Dockle, and Lynis are each best-in-class for their domain. This roundup covers what each tool actually scans, what it misses, and — if you are running AI workloads on self-hosted infrastructure — which column only one tool fills.

Four surfaces, six tools

The tools

1. Trivy — the broadest all-in-one scanner

2. Grype — fast CVE scanner with EPSS/KEV prioritization

3. Docker Scout — integrated but cloud-backed

4. Dockle — CIS Docker Image Benchmark linter

5. Lynis — host OS auditor

6. Keelix — whole-box posture gate (including AI/MCP)

Side by side

TrivyGrypeDocker ScoutDockleLynisKeelix
Primary scopeContainer images, filesystems, git repos, K8s manifests, IaCContainer images, filesystems, SBOMsContainer images (cloud-backed)Container image best-practice linting (CIS-DI checks)Host OS: config, packages, auth, networkingWhole box: host config, containers, outside-in exposure, AI/MCP posture
CVE scanning✓ Deep — OS packages + 20+ language ecosystems, EPSS/KEV✓ Deep — OS packages + 20+ language ecosystems, EPSS/KEV, OpenVEX✓ Image CVEs (requires Docker account; cloud-backed)✗ Not scanned✓ Installed OS packages (host only, no containers)✓ Host OS packages (posture checks)
IaC / Dockerfile misconfigs✓ Terraform, CloudFormation, K8s, Helm, Dockerfile, ARM, Ansible✗ Not scanned✗ Not scanned✓ CIS Docker Image checkpoints (11 CIS-DI checks + Dockle proprietary)✗ Not scanned✓ 93 CIS/SOC 2/ISO 27001-mapped host + container checks
Outside-in exposure scan✗ Not scanned✗ Not scanned✗ Not scanned✗ Not scanned✗ Not scanned✓ Shows what is actually reachable from the internet (0.0.0.0 bindings, open ports)
AI-agent / MCP posture✗ Not scanned✗ Not scanned✗ Not scanned✗ Not scanned✗ Not scanned✓ Auto-approval, plaintext secrets, unvetted servers, lethal trifecta
SBOM generation✓ CycloneDX, SPDX, GitHub-flavored✓ CycloneDX, SPDX, Syft JSON (via Syft integration)✓ CycloneDX, SPDX✗ Not generated✗ Not generated✗ Not generated
Output / scoringCVE list + severity + SBOM + misconfig findingsCVE list + severity, EPSS scores, OpenVEX supportCVE list + remediation suggestions + policy evaluationPass/fail per CIS checkpoint; 5 severity levelsHardening index + per-finding suggestions (prose report)0–100 whole-box posture score + per-finding report (JSON/HTML/scan record)
CI gate mechanismExit code on severity threshold (--exit-code 1 --severity CRITICAL)Exit code on severity thresholdPolicy evaluation; no native exit-code gate without CLI wrapperExit code on findings (--exit-level FATAL)Hardening index; manual threshold via scriptExit code on posture threshold (e.g. score ≥ 80) + GitHub Action
Compliance evidence✗ Not generated✗ Not generated✗ Not generated✗ Not generated (CIS-DI findings only)✗ Not generated✓ SOC 2, ISO 27001, CIS Docker Benchmark — shareable audit records
Local-first / zero telemetry✓ Runs fully locally; CVE DB downloaded and cached✓ Runs fully locally; no account required✗ Cloud-backed — image analysis data sent to Docker infrastructure✓ Runs fully locally✓ Runs fully locally on the host✓ Nothing leaves your box; secrets redacted at scan boundary
Docker / cloud account requiredNoneNoneDocker account required for Hub-linked features and cloud analysisNoneNoneNone
LicenseApache-2.0Apache-2.0Proprietary (Personal free: 1 Scout-enabled repo; Pro $9/user/mo billed annually ($11/mo monthly); Team $15/user/mo billed annually ($16/mo monthly))Apache-2.0GPL (open-source; enterprise plugins available)Apache-2.0 CLI free; Keelix Cloud for history + teams

Recommended pipeline for self-hosted Docker deployments

Example pipeline (GitHub Actions)
# Build stage — image CVE scan
- name: Trivy image scan
  uses: aquasecurity/trivy-action@v0.35.0  # pin to commit SHA in prod
  with:
    image-ref: myapp:${{ github.sha }}
    exit-code: 1
    severity: CRITICAL

# Build stage — CIS Docker Image check
- name: Dockle image lint
  run: |
    dockle --exit-code 1 --exit-level fatal myapp:${{ github.sha }}

# Deploy-to-staging — whole-box posture gate
- name: Keelix posture gate
  uses: jakelamon/keelix@v0.1.0
  with:
    threshold: 80
    fail-on: mcp-auto-approval,mcp-secrets

Frequently asked

Which Docker security scanner is best for self-hosted servers?
For self-hosted VPS or bare-metal deployments, the right answer is usually more than one tool — because each scans a different surface. Trivy or Grype handles CVE scanning on your container images (both local-first, Apache-2.0, no account required). Lynis audits the host OS. Keelix is the only tool that ties all surfaces together — host config, container posture, internet-reachable ports, and the AI agents or MCP servers running on the box — into a single 0–100 score you can gate a deploy on.
What is the difference between Trivy and Grype?
Both are fast, local, Apache-2.0 CVE scanners with no account requirement — and both are excellent at their job. The main differences: Trivy covers more target types (Kubernetes manifests, Terraform/CloudFormation IaC, Helm charts, Ansible, Dockerfiles) in a single binary. Grype focuses on container images and filesystems and integrates tightly with Syft for SBOM-driven scanning, with strong EPSS/KEV prioritization and OpenVEX support. Most teams pick one as their primary image scanner; Trivy's broader IaC coverage makes it the more common choice for a single tool, but Grype's SBOM-native workflow is preferred by teams already using Syft.
Does Docker Scout require a Docker account?
Yes — Docker Scout's full feature set (continuous monitoring, policy evaluation, Hub integration) requires a Docker account, and image analysis data is processed through Docker's cloud infrastructure. The free Personal plan allows 1 Docker Scout-enabled repository. For teams with strict data-residency requirements or air-gapped environments, this cloud-backed model is a meaningful constraint. Trivy and Grype are the standard local-first alternatives.
What does Dockle check that Trivy does not?
Dockle checks built Docker images against CIS Docker Image Benchmark (CIS-DI-0001 through CIS-DI-0011) and its own best-practice checkpoints — for example, whether setuid/setgid files are compliant, whether sensitive files were accidentally packaged, whether the image runs as a non-root user, and whether the HEALTHCHECK instruction is set. These are image-layer configuration checks, not CVE scanning. Trivy has some IaC and Dockerfile misconfiguration coverage, but Dockle is more granular on the CIS-DI layer for a built image. Most hardening pipelines run both.
Does any open-source Docker scanner check AI agent security?
Keelix does. Trivy, Grype, Docker Scout, Dockle, and Lynis are all completely blind to the AI agents and MCP servers running on the same box. None of them check whether an MCP server auto-approves all tool calls, whether an API key is stored in plaintext in a Claude Code config file, or whether the lethal trifecta is present. That surface is new enough that none of the established Docker scanners have added it — Keelix was built specifically to close that gap.
Can I use Lynis and Keelix together?
Yes — and they are complementary, not duplicative. Lynis is a host-only auditor: it checks the Linux system configuration (SSH hardening, PAM, boot loader, package freshness, network config) and produces a prose hardening report. It does not scan containers, does not show what ports Docker has opened through iptables, and has no awareness of AI agents or MCP servers. Keelix scans the whole box — including the host checks Lynis covers (mapped to CIS/SOC 2/ISO 27001 controls) plus containers, outside-in exposure, and AI/MCP posture — and produces a single scored, shareable audit record rather than a prose report. You can run Lynis for the deeper host-only detail and Keelix as the CI gate.

Add the column no Docker scanner fills.

Free, local-first, Apache-2.0. Runs after Trivy — not instead of it.

operator@host — keelix
# install — free & open source (Apache-2.0)
$ curl -fsSL https://keelix.dev/install.sh | sh
$ keelix scan