mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-02-23 16:36:39 +01:00
Merge pull request #311 from konstruktoid/ISSUE309
deprecated --disable-legacy-registry
This commit is contained in:
commit
b73d254e76
1 changed files with 20 additions and 12 deletions
|
@ -284,8 +284,11 @@ check_2_12() {
|
||||||
|
|
||||||
# 2.13
|
# 2.13
|
||||||
check_2_13() {
|
check_2_13() {
|
||||||
check_2_13="2.13 - Ensure operations on legacy registry (v1) are Disabled"
|
docker_version=$(docker version | grep -i -A2 '^server' | grep ' Version:' \
|
||||||
|
| awk '{print $NF; exit}' | tr -d '[:alpha:]-,.')
|
||||||
totalChecks=$((totalChecks + 1))
|
totalChecks=$((totalChecks + 1))
|
||||||
|
if [ "$docker_version" -lt 1712 ]; then
|
||||||
|
check_2_13="2.13 - Ensure operations on legacy registry (v1) are Disabled"
|
||||||
if get_docker_configuration_file_args 'disable-legacy-registry' | grep 'true' >/dev/null 2>&1; then
|
if get_docker_configuration_file_args 'disable-legacy-registry' | grep 'true' >/dev/null 2>&1; then
|
||||||
pass "$check_2_13"
|
pass "$check_2_13"
|
||||||
logjson "2.13" "PASS"
|
logjson "2.13" "PASS"
|
||||||
|
@ -299,6 +302,11 @@ check_2_13() {
|
||||||
logjson "2.13" "WARN"
|
logjson "2.13" "WARN"
|
||||||
currentScore=$((currentScore - 1))
|
currentScore=$((currentScore - 1))
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
check_2_13="2.13 - Ensure operations on legacy registry (v1) are Disabled (Deprecated)"
|
||||||
|
info "$check_2_13"
|
||||||
|
logjson "2.13" "info"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# 2.14
|
# 2.14
|
||||||
|
|
Loading…
Reference in a new issue