From 6921eaa6e924c265869cbae7c9ff1072f8d268f7 Mon Sep 17 00:00:00 2001 From: Toni de la Fuente Date: Thu, 11 Nov 2021 11:25:12 +0100 Subject: [PATCH] Fix issue #868 --- checks/check21 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/checks/check21 b/checks/check21 index 0446243e..54a8b364 100644 --- a/checks/check21 +++ b/checks/check21 @@ -55,11 +55,14 @@ check21(){ textPass "$regx: Trail $trail is enabled for all regions" "$regx" "$trail" fi fi - done fi done if [[ $trail_count == 0 ]]; then - textFail "$regx: No CloudTrail trails were found in the account" "$regx" "$trail" + if [[ $FILTERREGION ]]; then + textFail "$regx: No CloudTrail trails were found in the filtered region" "$regx" "$trail" + else + textFail "$regx: No CloudTrail trails were found in the account" "$regx" "$trail" + fi fi -} +} \ No newline at end of file