mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-07-26 12:37:51 +00:00
Modify get_docker_configuration_file_args in order to handle daemon.json better,
and also address missing files issue. Closes #231 Closes #232 Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
d5894203c6
commit
91e625b8e4
3 changed files with 23 additions and 19 deletions
|
@ -67,13 +67,15 @@ fi
|
|||
|
||||
# 2.6
|
||||
check_2_6="2.6 - Configure TLS authentication for Docker daemon"
|
||||
if get_docker_configuration_file_args 'tls' | grep true >/dev/null 2>&1; then
|
||||
if get_docker_configuration_file_args 'tlskey' | grep -v '""' >/dev/null 2>&1; then
|
||||
if get_docker_configuration_file_args 'tlsverify' | grep 'true' >/dev/null 2>&1; then
|
||||
pass "$check_2_6"
|
||||
else
|
||||
warn "$check_2_6"
|
||||
warn " * Docker daemon currently listening on TCP with TLS, but no verification"
|
||||
if grep -i 'tcp://' "$CONFIG_FILE" 2>/dev/null 1>&2; then
|
||||
if get_docker_configuration_file_args '"tls":' | grep 'true' 2>/dev/null 1>&2; then
|
||||
if get_docker_configuration_file_args 'tlskey' | grep -v '""' >/dev/null 2>&1; then
|
||||
if get_docker_configuration_file_args 'tlsverify' | grep 'true' >/dev/null 2>&1; then
|
||||
pass "$check_2_6"
|
||||
else
|
||||
warn "$check_2_6"
|
||||
warn " * Docker daemon currently listening on TCP with TLS, but no verification"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
warn "$check_2_6"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue