mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 06:45:08 +00:00
fix(include/outputs):Rolling back whitelist checking to RE check (#1037)
* fix(include/outputs):Rolling back whitelist checking to RE check * fix(include/ouputs): Clarified variable assignation coming from argument
This commit is contained in:
@@ -171,14 +171,14 @@ textFail(){
|
||||
ignore_check_name="${excluded_item%%:*}" # Check name is everything up to the first :
|
||||
# Resource value is the second field of line included in whitelist divided by :
|
||||
resource_value=$(awk -F ":" '{print $2}' <<< $excluded_item)
|
||||
# Checked value is the second field of log message divided by spaces
|
||||
checked_value=$(awk '{print $2}' <<< $1)
|
||||
# Checked value is the whole log message that comes as argument
|
||||
checked_value=$1
|
||||
if [[ "${ignore_check_name}" != "${CHECK_NAME}" ]]; then
|
||||
# not for this check
|
||||
continue
|
||||
fi
|
||||
# To set WARNING flag both values must be exactly the same
|
||||
if [[ "${checked_value}" == "${resource_value}" ]]; then
|
||||
if [[ "${checked_value}" == *"${resource_value}"* ]]; then
|
||||
level="WARNING"
|
||||
colorcode="${WARNING}"
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user