From 679414418e90fd91af5d486816d34eb65d22d61b Mon Sep 17 00:00:00 2001 From: Daniel Lorch <98748454+lorchda@users.noreply.github.com> Date: Wed, 2 Feb 2022 17:45:56 +0100 Subject: [PATCH] Fix: when prowler exits with a non-zero status, the remainder of the block is not executed (#1015) * Fix: when prowler exits with a non-zero status, the remainder of the block is not executed * Fix: do not trigger exit code 3 on failed checks, so that the remainder of the block is executed --- .../serverless_codebuild/src/run-prowler-reports.sh | 2 +- util/org-multi-account/src/run-prowler-reports.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util/org-multi-account/serverless_codebuild/src/run-prowler-reports.sh b/util/org-multi-account/serverless_codebuild/src/run-prowler-reports.sh index 98fa397d..ea946aed 100644 --- a/util/org-multi-account/serverless_codebuild/src/run-prowler-reports.sh +++ b/util/org-multi-account/serverless_codebuild/src/run-prowler-reports.sh @@ -93,7 +93,7 @@ for accountId in $ACCOUNTS_IN_ORGS; do # Run Prowler echo -e "Assessing AWS Account: $accountId, using Role: $ROLE on $(date)" # remove -g cislevel for a full report and add other formats if needed - ./prowler/prowler -R "$ROLE" -A "$accountId" -g cislevel1 -M $FORMAT + ./prowler/prowler -R "$ROLE" -A "$accountId" -g cislevel1 -M $FORMAT -z echo "Report stored locally at: prowler/output/ directory" TOTAL_SEC=$((SECONDS - START_TIME)) echo -e "Completed AWS Account: $accountId, using Role: $ROLE on $(date)" diff --git a/util/org-multi-account/src/run-prowler-reports.sh b/util/org-multi-account/src/run-prowler-reports.sh index d5524ed2..545a9162 100644 --- a/util/org-multi-account/src/run-prowler-reports.sh +++ b/util/org-multi-account/src/run-prowler-reports.sh @@ -89,7 +89,7 @@ for accountId in $ACCOUNTS_IN_ORGS; do # Run Prowler echo -e "Assessing AWS Account: $accountId, using Role: $ROLE on $(date)" # remove -g cislevel for a full report and add other formats if needed - ./prowler/prowler -R "$ROLE" -A "$accountId" -g cislevel1 -M html + ./prowler/prowler -R "$ROLE" -A "$accountId" -g cislevel1 -M html -z echo "Report stored locally at: prowler/output/ directory" TOTAL_SEC=$((SECONDS - START_TIME)) echo -e "Completed AWS Account: $accountId, using Role: $ROLE on $(date)"