EN
ENNA

Dockle

Apache-2.0

๐Ÿ“ฆ Container Security ยท Go

Dockle is a container image linter for security, helping build the best practice Docker/OCI image. It checks built container images for security issues and best practice violations based on the CIS Docker Benchmark and additional security checks. Unlike Dockerfile linters that only analyze the build instructions, Dockle inspects the actual built image, catching issues like credentials left in image layers, unnecessary setuid/setgid binaries, missing USER directives (running as root), writable executables, and unused environment variables containing secrets. Dockle outputs clear, actionable findings with severity levels (FATAL, WARN, INFO) and references to CIS benchmark sections. It integrates easily into CI/CD pipelines, supports JSON output for automation, and can be configured with an ignore file for accepted risks. Dockle fills the gap between Dockerfile linting (like Hadolint) and runtime scanning (like Falco).

3.2kstars
162forks
41issues
Updated 3d ago

Installation

brew (macOS)

$ brew install goodwithtech/r/dockle

Go

$ go install github.com/goodwithtech/dockle@latest

Docker

$ docker run --rm goodwithtech/dockle:latest <image>

Use Cases

  • Scanning Docker images for security best practice violations in CI/CD pipelines
  • Detecting credentials and secrets left in container image layers
  • Checking images against CIS Docker Benchmark requirements
  • Finding containers running as root or with unnecessary capabilities
  • Validating image security before deployment to production registries

Tags

dockerlintercis-benchmarkbest-practicesci-cdimage-scanningcontainersgogolangkubernetessecuritysecurity-auditsecurity-toolsvulnerability

More in Container Security