mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
Fix -e option always skipping check_1, check_2, check_3 and ...
this also caused the output json to be malformed without proper grouping/nesting Signed-off-by: Cheng-Li Jerry Ma <chengli.ma@gmail.com>
This commit is contained in:
parent
a9caef9eb6
commit
db8a8c0d96
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ main () {
|
||||||
cis
|
cis
|
||||||
elif [ -z "$check" ] && [ "$checkexclude" ]; then
|
elif [ -z "$check" ] && [ "$checkexclude" ]; then
|
||||||
checkexcluded="$(echo ",$checkexclude" | sed -e 's/^/\^/g' -e 's/,/\$|/g' -e 's/$/\$/g')"
|
checkexcluded="$(echo ",$checkexclude" | sed -e 's/^/\^/g' -e 's/,/\$|/g' -e 's/$/\$/g')"
|
||||||
grep 'check_[0-9]_' functions_lib.sh | grep -vE "\'$checkexcluded\'" | while read -r c; do
|
grep 'check_[0-9]' functions_lib.sh | grep -vE "\'$checkexcluded\'" | while read -r c; do
|
||||||
"$c"
|
"$c"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue