mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
ignore section 8 if community edition
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
a785c02c59
commit
d7f1d9753a
2 changed files with 26 additions and 9 deletions
|
@ -149,9 +149,18 @@ docker_swarm_configuration() {
|
|||
|
||||
docker_enterprise_configuration() {
|
||||
check_8
|
||||
check_product_license
|
||||
check_8_1
|
||||
check_8_1_1
|
||||
check_8_1_2
|
||||
check_8_1_3
|
||||
check_8_1_4
|
||||
check_8_1_5
|
||||
check_8_1_6
|
||||
check_8_1_7
|
||||
check_8_1_end
|
||||
check_8_2
|
||||
check_8_2_1
|
||||
check_8_2_end
|
||||
check_8_end
|
||||
}
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
check_product_license() {
|
||||
if docker info -f '{{ .ProductLicense }}' | grep -qi 'Community Engine'; then
|
||||
info " * Community Engine license, skipping section 8."
|
||||
enterprise_license=0
|
||||
else
|
||||
enterprise_license=1
|
||||
fi
|
||||
}
|
||||
|
||||
check_8() {
|
||||
logit "\n"
|
||||
id_8="8"
|
||||
|
@ -18,7 +9,20 @@ check_8() {
|
|||
startsectionjson "$id_8" "$desc_8"
|
||||
}
|
||||
|
||||
check_product_license() {
|
||||
if docker version | grep -qi '^Client.*Community$'; then
|
||||
info " * Community Engine license, skipping section 8"
|
||||
enterprise_license=0
|
||||
else
|
||||
enterprise_license=1
|
||||
fi
|
||||
}
|
||||
|
||||
check_8_1() {
|
||||
if [ "$enterprise_license" -ne 1 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
logit "\n"
|
||||
id_8_1="8.1"
|
||||
desc_8_1="Universal Control Plane Configuration"
|
||||
|
@ -151,6 +155,10 @@ check_8_1_end() {
|
|||
}
|
||||
|
||||
check_8_2() {
|
||||
if [ "$enterprise_license" -ne 1 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
logit "\n"
|
||||
id_8_2="8.2"
|
||||
desc_8_2="Docker Trusted Registry Configuration"
|
||||
|
|
Loading…
Reference in a new issue