Description
CIS Docker Benchmark v1.6.0 recommendation 2.3, "Ensure the logging level is set to 'info' (Manual)," states that log-level
should be set to info
.
check_2_3()
accounts for log-level
being explicitly set via command-line options -l
and --log-level
and checks the contents of several possible config files, but doesn't appear to take into account that the default log-level
for Docker is already info
.
docker-bench-security/tests/2_docker_daemon_configuration.sh
Lines 46 to 81 in 2311026
$ dockerd --help|grep -i log
--log-driver string Default driver for container logs (default "json-file")
--log-format string Set the logging format ("text"|"json") (default "text")
-l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
--log-opt map Default log driver options for containers (default map[])
--raw-logs Full timestamps without ANSI coloring
Reference: https://docs.docker.com/reference/cli/dockerd/
Since this is a default value, it's not set explicitly and doesn't appear in any config files. In order for this check to be more accurate, should it assume that if no alternate value for log-level
is found, the default is used, and the check has passed?
Of course, a work-around to pass the check is to explicitly set the log-level
to info
.
Thoughts?