mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 14:55:00 +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 :
|
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 is the second field of line included in whitelist divided by :
|
||||||
resource_value=$(awk -F ":" '{print $2}' <<< $excluded_item)
|
resource_value=$(awk -F ":" '{print $2}' <<< $excluded_item)
|
||||||
# Checked value is the second field of log message divided by spaces
|
# Checked value is the whole log message that comes as argument
|
||||||
checked_value=$(awk '{print $2}' <<< $1)
|
checked_value=$1
|
||||||
if [[ "${ignore_check_name}" != "${CHECK_NAME}" ]]; then
|
if [[ "${ignore_check_name}" != "${CHECK_NAME}" ]]; then
|
||||||
# not for this check
|
# not for this check
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
# To set WARNING flag both values must be exactly the same
|
# 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"
|
level="WARNING"
|
||||||
colorcode="${WARNING}"
|
colorcode="${WARNING}"
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user