mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 08:42:33 +01:00
Merge pull request #198 from konstruktoid/pr182_output
#182 output formating
This commit is contained in:
commit
ceb516fc29
2 changed files with 13 additions and 7 deletions
|
@ -59,7 +59,9 @@ for img in $images; do
|
||||||
warn "$check_4_6"
|
warn "$check_4_6"
|
||||||
fi
|
fi
|
||||||
imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null)
|
imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null)
|
||||||
warn " * No Healthcheck found : $imgName"
|
if ! [ "$imgName" = '[]' ]; then
|
||||||
|
warn " * No Healthcheck found: $imgName"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ $fail -eq 0 ]; then
|
if [ $fail -eq 0 ]; then
|
||||||
|
@ -77,7 +79,9 @@ for img in $images; do
|
||||||
info "$check_4_7"
|
info "$check_4_7"
|
||||||
fi
|
fi
|
||||||
imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null)
|
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
|
fi
|
||||||
done
|
done
|
||||||
if [ $fail -eq 0 ]; then
|
if [ $fail -eq 0 ]; then
|
||||||
|
@ -95,7 +99,9 @@ for img in $images; do
|
||||||
info "$check_4_9"
|
info "$check_4_9"
|
||||||
fi
|
fi
|
||||||
imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null)
|
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
|
fi
|
||||||
done
|
done
|
||||||
if [ $fail -eq 0 ]; then
|
if [ $fail -eq 0 ]; then
|
||||||
|
|
|
@ -575,10 +575,10 @@ else
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
if [ $fail -eq 0 ]; then
|
if [ $fail -eq 0 ]; then
|
||||||
warn "$check_5_26"
|
warn "$check_5_26"
|
||||||
warn " * Health check not set for $c"
|
warn " * Health check not set: $c"
|
||||||
fail=1
|
fail=1
|
||||||
else
|
else
|
||||||
warn " * Health check not set for $c"
|
warn " * Health check not set: $c"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -597,10 +597,10 @@ else
|
||||||
# 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_28"
|
warn "$check_5_28"
|
||||||
warn " * pidslimit not set: $c"
|
warn " * PID limit not set: $c"
|
||||||
fail=1
|
fail=1
|
||||||
else
|
else
|
||||||
warn " * pidslimit not set: $c"
|
warn " * PID limit not set: $c"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue