mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 23:05:05 +00:00
Whitelist feature improvements @QuinnStevens
Whitelist feature improvements @QuinnStevens
This commit is contained in:
@@ -112,13 +112,15 @@ textFail(){
|
||||
level="FAIL"
|
||||
colorcode="$BAD"
|
||||
while read -r i; do
|
||||
ignore_check_name="${i%:*}"
|
||||
ignore_value="${i#*${CHECK_NAME}:}"
|
||||
ignore_check_name="${i%%:*}" # Check name is everything up to the first :
|
||||
ignore_value="${i#*${CHECK_NAME}:}" # Ignore value is everything after the first :
|
||||
# Check to see if ignore value appears anywhere within log message.
|
||||
resource_value=".*${ignore_value}.*"
|
||||
if [[ ${ignore_check_name} != "${CHECK_NAME}" ]]; then
|
||||
# not for this check
|
||||
continue
|
||||
fi
|
||||
if [[ $1 =~ .*"${ignore_value}".* ]]; then
|
||||
if [[ $1 =~ ${resource_value} ]]; then
|
||||
level="WARNING"
|
||||
colorcode="$WARNING"
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user