mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-31 14:22:33 +01:00
Merge pull request #45 from konstruktoid/version_count
update do_version_check and 5.7
This commit is contained in:
commit
10efc9ee61
2 changed files with 4 additions and 2 deletions
|
@ -40,9 +40,11 @@ fi
|
||||||
# 1.6
|
# 1.6
|
||||||
check_1_6="1.6 - Keep Docker up to date"
|
check_1_6="1.6 - Keep Docker up to date"
|
||||||
docker_version=$(docker version | grep 'Server version' | awk '{print $3}')
|
docker_version=$(docker version | grep 'Server version' | awk '{print $3}')
|
||||||
do_version_check 1.6.2 $docker_version
|
docker_current_version="1.7.0"
|
||||||
|
do_version_check "$docker_current_version" "$docker_version"
|
||||||
if [ $? -eq 11 ]; then
|
if [ $? -eq 11 ]; then
|
||||||
warn "$check_1_6"
|
warn "$check_1_6"
|
||||||
|
warn " * Using $docker_version, when $docker_current_version is current."
|
||||||
else
|
else
|
||||||
pass "$check_1_6"
|
pass "$check_1_6"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -180,7 +180,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
processes=$(docker exec "$c" ps -el 2>/dev/null | grep -c sshd | awk '{print $1}')
|
processes=$(docker exec "$c" ps -el 2>/dev/null | grep -c sshd | awk '{print $1}')
|
||||||
if [ $processes -gt 1 ]; then
|
if [ "$processes" -ge 1 ]; then
|
||||||
# If it's the first container, fail the test
|
# If it's the first container, fail the test
|
||||||
if [ $fail -eq 0 ]; then
|
if [ $fail -eq 0 ]; then
|
||||||
warn "$check_5_7"
|
warn "$check_5_7"
|
||||||
|
|
Loading…
Reference in a new issue