mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
test tls get_docker_configuration_file_args
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
6bafeb5386
commit
17ee45ba94
1 changed files with 6 additions and 6 deletions
|
@ -139,7 +139,7 @@ fi
|
|||
|
||||
# 3.9
|
||||
check_3_9="3.9 - Verify that TLS CA certificate file ownership is set to root:root"
|
||||
if get_docker_configuration_file_args 'tlscacert' 2>/dev/null 1>&2; then
|
||||
if ! [ -z $(get_docker_configuration_file_args 'tlscacert') ]; then
|
||||
tlscacert=$(get_docker_configuration_file_args 'tlscacert')
|
||||
else
|
||||
tlscacert=$(get_docker_effective_command_line_args '--tlscacert' | sed -n 's/.*tlscacert=\([^s]\)/\1/p' | sed 's/--/ --/g' | cut -d " " -f 1)
|
||||
|
@ -158,7 +158,7 @@ fi
|
|||
|
||||
# 3.10
|
||||
check_3_10="3.10 - Verify that TLS CA certificate file permissions are set to 444 or more restrictive"
|
||||
if get_docker_configuration_file_args 'tlscacert' 2>/dev/null 1>&2; then
|
||||
if ! [ -z $(get_docker_configuration_file_args 'tlscacert') ]; then
|
||||
tlscacert=$(get_docker_configuration_file_args 'tlscacert')
|
||||
else
|
||||
tlscacert=$(get_docker_effective_command_line_args '--tlscacert' | sed -n 's/.*tlscacert=\([^s]\)/\1/p' | sed 's/--/ --/g' | cut -d " " -f 1)
|
||||
|
@ -177,7 +177,7 @@ fi
|
|||
|
||||
# 3.11
|
||||
check_3_11="3.11 - Verify that Docker server certificate file ownership is set to root:root"
|
||||
if get_docker_configuration_file_args 'tlscert' 2>/dev/null 1>&2; then
|
||||
if ! [ -z $(get_docker_configuration_file_args 'tlscert') ]; then
|
||||
tlscert=$(get_docker_configuration_file_args 'tlscert')
|
||||
else
|
||||
tlscert=$(get_docker_effective_command_line_args '--tlscert' | sed -n 's/.*tlscert=\([^s]\)/\1/p' | sed 's/--/ --/g' | cut -d " " -f 1)
|
||||
|
@ -196,7 +196,7 @@ fi
|
|||
|
||||
# 3.12
|
||||
check_3_12="3.12 - Verify that Docker server certificate file permissions are set to 444 or more restrictive"
|
||||
if get_docker_configuration_file_args 'tlscert' 2>/dev/null 1>&2; then
|
||||
if ! [ -z $(get_docker_configuration_file_args 'tlscert') ]; then
|
||||
tlscert=$(get_docker_configuration_file_args 'tlscert')
|
||||
else
|
||||
tlscert=$(get_docker_effective_command_line_args '--tlscert' | sed -n 's/.*tlscert=\([^s]\)/\1/p' | sed 's/--/ --/g' | cut -d " " -f 1)
|
||||
|
@ -215,7 +215,7 @@ fi
|
|||
|
||||
# 3.13
|
||||
check_3_13="3.13 - Verify that Docker server key file ownership is set to root:root"
|
||||
if get_docker_configuration_file_args 'tlskey' 2>/dev/null 1>&2; then
|
||||
if ! [ -z $(get_docker_configuration_file_args 'tlskey') ]; then
|
||||
tlskey=$(get_docker_configuration_file_args 'tlskey')
|
||||
else
|
||||
tlskey=$(get_docker_effective_command_line_args '--tlskey' | sed -n 's/.*tlskey=\([^s]\)/\1/p' | sed 's/--/ --/g' | cut -d " " -f 1)
|
||||
|
@ -234,7 +234,7 @@ fi
|
|||
|
||||
# 3.14
|
||||
check_3_14="3.14 - Verify that Docker server key file permissions are set to 400 or more restrictive"
|
||||
if get_docker_configuration_file_args 'tlskey' 2>/dev/null 1>&2; then
|
||||
if ! [ -z $(get_docker_configuration_file_args 'tlskey') ]; then
|
||||
tlskey=$(get_docker_configuration_file_args 'tlskey')
|
||||
else
|
||||
tlskey=$(get_docker_effective_command_line_args '--tlskey' | sed -n 's/.*tlskey=\([^s]\)/\1/p' | sed 's/--/ --/g' | cut -d " " -f 1)
|
||||
|
|
Loading…
Reference in a new issue