From b37dfb95e3e8fe433c9b514fc79b3dc0f9467539 Mon Sep 17 00:00:00 2001 From: Mike Ritter Date: Tue, 27 Feb 2018 18:24:25 -0600 Subject: [PATCH] Minor fix to ensure exclude only works against container name Signed-off-by: Mike Ritter --- docker-bench-security.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-bench-security.sh b/docker-bench-security.sh index ab32924..36b274a 100755 --- a/docker-bench-security.sh +++ b/docker-bench-security.sh @@ -92,7 +92,7 @@ main () { containers=$(docker ps | sed '1d' | awk '{print $NF}') else pattern=$(echo "$exclude" | sed 's/,/|/g') - containers=$(docker ps | sed '1d' | grep -Ev "$pattern" | awk '{print $NF}') + containers=$(docker ps | sed '1d' | awk '{print $NF}' | grep -Ev "$pattern" ) fi # If there is a container with label docker_bench_security, memorize it: benchcont="nil"