How docker/docker-bench-security works
Docker Bench for Security is a command-line utility that assesses a Docker host and its containers against CIS benchmark practices. An operator invokes the script, optionally selects or excludes checks, and receives benchmark findings and log files. The checks span host configuration, Docker daemon settings and files, images, runtime, security operations, Swarm, and Docker Enterprise; community checks are also available. The README documents these capabilities and outputs, but no source excerpts were provided, so internal call relationships and helper-layer responsibilities cannot be verified.
Main entry points: docker-bench-security.sh Bench CLI · output_lib.sh Findings and Logs · 1_host_configuration.sh Host Configuration · 2_docker_daemon_configuration.sh Daemon Configuration
Components 14
Invocation
- Bench CLI
docker-bench-security.sh - Check Selection
docker-bench-security.sh
CIS Checks
- Host Configuration
tests/1_host_configuration.sh - Daemon Configuration
tests/2_docker_daemon_configuration.sh - Daemon Config Files
tests/3_docker_daemon_configuration_files.sh - Container Images
tests/4_container_images.sh - Container Runtime
tests/5_container_runtime.sh - Security Operations
tests/6_docker_security_operations.sh - Swarm Configuration
tests/7_docker_swarm_configuration.sh - Enterprise Configuration
tests/8_docker_enterprise_configuration.sh - Community Checks
tests/99_community_checks.sh
Results
- Findings and Logs
functions/output_lib.sh - Log Files
Other components
- Operator
Connections 13
- Operator → Bench CLI: invokes
README.md - Bench CLI → Check Selection: accepts options
README.md - Bench CLI → Host Configuration: runs checks
README.md - Bench CLI → Daemon Configuration: runs checks
README.md - Bench CLI → Daemon Config Files: runs checks
README.md - Bench CLI → Container Images: runs checks
README.md - Bench CLI → Container Runtime: runs checks
README.md - Bench CLI → Security Operations: runs checks
README.md - Bench CLI → Swarm Configuration: runs checks
README.md - Bench CLI → Enterprise Configuration: runs checks
README.md - Bench CLI → Community Checks: runs checks
README.md - Bench CLI → Findings and Logs: produces results
README.md - Findings and Logs → Log Files: writes logs
README.md