mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-06-28 07:36:43 +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))
|
totalChecks=$((totalChecks + 1))
|
||||||
|
|
||||||
if mountpoint -q -- "$(docker info -f '{{ .DockerRootDir }}')" >/dev/null 2>&1; then
|
if [[ "$(docker info -f '{{ .SecurityOptions }}')" =~ .*userns.* ]]; then
|
||||||
pass "$check_1_1"
|
if mountpoint -q -- "$(dirname "$(docker info -f '{{ .DockerRootDir }}')")" >/dev/null 2>&1; then
|
||||||
resulttestjson "PASS"
|
pass "$check_1_1"
|
||||||
currentScore=$((currentScore + 1))
|
resulttestjson "PASS"
|
||||||
|
currentScore=$((currentScore + 1))
|
||||||
|
else
|
||||||
|
warn "$check_1_1"
|
||||||
|
resulttestjson "WARN"
|
||||||
|
currentScore=$((currentScore - 1))
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
warn "$check_1_1"
|
if mountpoint -q -- "$(docker info -f '{{ .DockerRootDir }}')" >/dev/null 2>&1; then
|
||||||
resulttestjson "WARN"
|
pass "$check_1_1"
|
||||||
currentScore=$((currentScore - 1))
|
resulttestjson "PASS"
|
||||||
|
currentScore=$((currentScore + 1))
|
||||||
|
else
|
||||||
|
warn "$check_1_1"
|
||||||
|
resulttestjson "WARN"
|
||||||
|
currentScore=$((currentScore - 1))
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue