mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 20:42:02 +00:00
fix(codebuild_update): AWS CLI and permissions update. (#1183)
This commit is contained in:
@@ -93,11 +93,11 @@ sendToSecurityHub(){
|
||||
|
||||
local finding_id=$(echo ${findings} | jq -r .Id )
|
||||
SECURITYHUB_NEW_FINDINGS_IDS+=( "$finding_id" )
|
||||
BATCH_IMPORT_RESULT=$($AWSCLI securityhub --region "$region" $PROFILE_OPT batch-import-findings --findings "${findings}")
|
||||
BATCH_IMPORT_RESULT=$($AWSCLI securityhub --region "$region" $PROFILE_OPT batch-import-findings --findings "${findings}" 2>&1)
|
||||
|
||||
# Check for success if imported
|
||||
if [[ -z "${BATCH_IMPORT_RESULT}" ]] || ! jq -e '.SuccessCount == 1' <<< "${BATCH_IMPORT_RESULT}" > /dev/null 2>&1; then
|
||||
echo -e "\n$RED ERROR!$NORMAL Failed to send check output to AWS Security Hub\n"
|
||||
echo "${BAD} ERROR! Failed to send check output to AWS Security Hub.${NORMAL}"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user