mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
output formating
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
00b45ef205
commit
933f1b6da9
2 changed files with 13 additions and 7 deletions
|
@ -59,7 +59,9 @@ for img in $images; do
|
|||
warn "$check_4_6"
|
||||
fi
|
||||
imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null)
|
||||
warn " * No Healthcheck found : $imgName"
|
||||
if ! [ "$imgName" = '[]' ]; then
|
||||
warn " * No Healthcheck found: $imgName"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $fail -eq 0 ]; then
|
||||
|
@ -77,7 +79,9 @@ for img in $images; do
|
|||
info "$check_4_7"
|
||||
fi
|
||||
imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null)
|
||||
info " * Update instruction found in history of $imgName"
|
||||
if ! [ "$imgName" = '[]' ]; then
|
||||
info " * Update instruction found: $imgName"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $fail -eq 0 ]; then
|
||||
|
@ -95,7 +99,9 @@ for img in $images; do
|
|||
info "$check_4_9"
|
||||
fi
|
||||
imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null)
|
||||
info " * Found ADD in docker history of $imgName"
|
||||
if ! [ "$imgName" = '[]' ]; then
|
||||
info " * ADD in image history: $imgName"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $fail -eq 0 ]; then
|
||||
|
|
|
@ -575,10 +575,10 @@ else
|
|||
if [ $? -ne 0 ]; then
|
||||
if [ $fail -eq 0 ]; then
|
||||
warn "$check_5_26"
|
||||
warn " * Health check not set for $c"
|
||||
warn " * Health check not set: $c"
|
||||
fail=1
|
||||
else
|
||||
warn " * Health check not set for $c"
|
||||
warn " * Health check not set: $c"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
@ -597,10 +597,10 @@ else
|
|||
# If it's the first container, fail the test
|
||||
if [ $fail -eq 0 ]; then
|
||||
warn "$check_5_28"
|
||||
warn " * pidslimit not set: $c"
|
||||
warn " * PID limit not set: $c"
|
||||
fail=1
|
||||
else
|
||||
warn " * pidslimit not set: $c"
|
||||
warn " * PID limit not set: $c"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue