mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
print img if empty RepoTags, and fix tabbing
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
93c619f018
commit
3877abd975
1 changed files with 7 additions and 4 deletions
|
@ -39,11 +39,11 @@ check_4_1() {
|
||||||
if [ $fail -eq 0 ]; then
|
if [ $fail -eq 0 ]; then
|
||||||
warn "$check_4_1"
|
warn "$check_4_1"
|
||||||
warn " * Running as root: $c"
|
warn " * Running as root: $c"
|
||||||
root_containers="$root_containers $c"
|
root_containers="$root_containers $c"
|
||||||
fail=1
|
fail=1
|
||||||
else
|
else
|
||||||
warn " * Running as root: $c"
|
warn " * Running as root: $c"
|
||||||
root_containers="$root_containers $c"
|
root_containers="$root_containers $c"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -138,7 +138,10 @@ check_4_6() {
|
||||||
imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null)
|
imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null)
|
||||||
if ! [ "$imgName" = '[]' ]; then
|
if ! [ "$imgName" = '[]' ]; then
|
||||||
warn " * No Healthcheck found: $imgName"
|
warn " * No Healthcheck found: $imgName"
|
||||||
no_health_images="$no_health_images $imgName"
|
no_health_images="$no_health_images $imgName"
|
||||||
|
else
|
||||||
|
warn " * No Healthcheck found: $img"
|
||||||
|
no_health_images="$no_health_images $img"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -171,7 +174,7 @@ check_4_7() {
|
||||||
imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null)
|
imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null)
|
||||||
if ! [ "$imgName" = '[]' ]; then
|
if ! [ "$imgName" = '[]' ]; then
|
||||||
info " * Update instruction found: $imgName"
|
info " * Update instruction found: $imgName"
|
||||||
update_images="$update_images $imgName"
|
update_images="$update_images $imgName"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue