Merge pull request #360 from konstruktoid/ISSUE358

catch root with uid and name as well #358 CVE-2019-5736
This commit is contained in:
Thomas Sjögren 2019-02-13 15:00:46 +01:00 committed by GitHub
commit f8be7239e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,7 @@ check_4_1() {
for c in $containers; do
user=$(docker inspect --format 'User={{.Config.User}}' "$c")
if [ "$user" = "User=" ] || [ "$user" = "User=[]" ] || [ "$user" = "User=<no value>" ]; then
if [ "$user" = "User=0" ] || [ "$user" = "User=root" ] || [ "$user" = "User=" ] || [ "$user" = "User=[]" ] || [ "$user" = "User=<no value>" ]; then
# If it's the first container, fail the test
if [ $fail -eq 0 ]; then
warn "$check_4_1"