mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
feat: improve sed match
Signed-off-by: wilmardo <info@wilmardenouden.nl>
This commit is contained in:
parent
1b37a1e6bc
commit
cf9baa76ae
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ main () {
|
||||||
if command -v "$i" 2>/dev/null 1>&2; then
|
if command -v "$i" 2>/dev/null 1>&2; then
|
||||||
if [ "$checkexclude" ]; then
|
if [ "$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')"
|
||||||
included_checks=$(sed -ne "/$i() {/,/}/{/check/p}" functions_lib.sh | grep -vE "$checkexcluded")
|
included_checks=$(sed -ne "/$i() {/,/}/{/{/d; /}/d; p}" functions_lib.sh | grep -vE "$checkexcluded")
|
||||||
for check in $included_checks; do
|
for check in $included_checks; do
|
||||||
"$check"
|
"$check"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue