Added servicename to the title for ASFF

This commit is contained in:
Toni de la Fuente
2021-07-29 17:03:04 +02:00
parent 3f63b83179
commit 52e04406dc

View File

@@ -326,7 +326,7 @@ generateJsonAsffOutput(){
local status=$2
#Checks to determine if the rule passes in a resource name that prowler uses to track the AWS Resource for whitelisting purposes
if [ -z $3 ]; then
if [[ -z $3 ]]; then
local resource_id="NONE_PROVIDED"
else
local resource_id=$3
@@ -337,7 +337,7 @@ generateJsonAsffOutput(){
fi
jq -M -c \
--arg ACCOUNT_NUM "$ACCOUNT_NUM" \
--arg TITLE_TEXT "$TITLE_TEXT" \
--arg TITLE_TEXT "$CHECK_SERVICENAME.$TITLE_TEXT" \
--arg MESSAGE "$(echo -e "${message}")" \
--arg UNIQUE_ID "$(LC_ALL=C echo -e -n "${message}" | tr -cs '[:alnum:]._~-' '_')" \
--arg STATUS "$status" \