mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-06-20 05:39:08 +00:00
Update 1_host_configuration.sh
Signed-off-by: Demian Ginther <st.diluted@gmail.com>
This commit is contained in:
parent
f8be7239e5
commit
5b29cd5b10
1 changed files with 19 additions and 7 deletions
|
@ -18,14 +18,26 @@ check_1_1() {
|
|||
|
||||
totalChecks=$((totalChecks + 1))
|
||||
|
||||
if mountpoint -q -- "$(docker info -f '{{ .DockerRootDir }}')" >/dev/null 2>&1; then
|
||||
pass "$check_1_1"
|
||||
resulttestjson "PASS"
|
||||
currentScore=$((currentScore + 1))
|
||||
if [[ "$(docker info -f '{{ .SecurityOptions }}')" =~ .*userns.* ]]; then
|
||||
if mountpoint -q -- "$(dirname "$(docker info -f '{{ .DockerRootDir }}')")" >/dev/null 2>&1; then
|
||||
pass "$check_1_1"
|
||||
resulttestjson "PASS"
|
||||
currentScore=$((currentScore + 1))
|
||||
else
|
||||
warn "$check_1_1"
|
||||
resulttestjson "WARN"
|
||||
currentScore=$((currentScore - 1))
|
||||
fi
|
||||
else
|
||||
warn "$check_1_1"
|
||||
resulttestjson "WARN"
|
||||
currentScore=$((currentScore - 1))
|
||||
if mountpoint -q -- "$(docker info -f '{{ .DockerRootDir }}')" >/dev/null 2>&1; then
|
||||
pass "$check_1_1"
|
||||
resulttestjson "PASS"
|
||||
currentScore=$((currentScore + 1))
|
||||
else
|
||||
warn "$check_1_1"
|
||||
resulttestjson "WARN"
|
||||
currentScore=$((currentScore - 1))
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue