mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
fix: check_2_7 not working as intended
- #L152 use jq on first if statement, as it is used on the second if statement too (dependency already given) - #L154 fixed key which is searched for - fixed several wrongly placed closing brackets
This commit is contained in:
parent
ff26d67f25
commit
30e2af962b
1 changed files with 5 additions and 5 deletions
|
@ -149,16 +149,16 @@ check_2_7() {
|
||||||
local check="$id - $desc"
|
local check="$id - $desc"
|
||||||
starttestjson "$id" "$desc"
|
starttestjson "$id" "$desc"
|
||||||
|
|
||||||
if $(grep -qE "host.*tcp://" "$CONFIG_FILE") || \
|
if $(get_docker_configuration_file_args 'hosts' | grep 'tcp://' > /dev/null 2>&1) || \
|
||||||
[ $(get_docker_cumulative_command_line_args '-H' | grep -vE '(unix|fd)://') > /dev/null 2>&1 ]; then
|
[ $(get_docker_cumulative_command_line_args '-H' | grep -vE '(unix|fd)://' > /dev/null 2>&1) ]; then
|
||||||
if [ $(get_docker_configuration_file_args '"tlsverify":' | grep 'true') ] || \
|
if [ $(get_docker_configuration_file_args 'tlsverify' | grep 'true') ] || \
|
||||||
[ $(get_docker_cumulative_command_line_args '--tlsverify' | grep 'tlsverify') >/dev/null 2>&1 ]; then
|
[ $(get_docker_cumulative_command_line_args '--tlsverify' | grep 'tlsverify' >/dev/null 2>&1) ]; then
|
||||||
pass -s "$check"
|
pass -s "$check"
|
||||||
logcheckresult "PASS"
|
logcheckresult "PASS"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $(get_docker_configuration_file_args '"tls":' | grep 'true') ] || \
|
if [ $(get_docker_configuration_file_args '"tls":' | grep 'true') ] || \
|
||||||
[ $(get_docker_cumulative_command_line_args '--tls' | grep 'tls$') >/dev/null 2>&1 ]; then
|
[ $(get_docker_cumulative_command_line_args '--tls' | grep 'tls$' >/dev/null 2>&1) ]; then
|
||||||
warn -s "$check"
|
warn -s "$check"
|
||||||
warn " * Docker daemon currently listening on TCP with TLS, but no verification"
|
warn " * Docker daemon currently listening on TCP with TLS, but no verification"
|
||||||
logcheckresult "WARN" "Docker daemon currently listening on TCP with TLS, but no verification"
|
logcheckresult "WARN" "Docker daemon currently listening on TCP with TLS, but no verification"
|
||||||
|
|
Loading…
Reference in a new issue