From 63d06212db3216644b61b83e662ccb7b40781b91 Mon Sep 17 00:00:00 2001 From: Geert Smelt Date: Fri, 26 Jun 2020 11:55:12 +0200 Subject: [PATCH] Fix listing CloudFormation stacks if default output format is not JSON --- checks/check_extra742 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checks/check_extra742 b/checks/check_extra742 index 309f75d5..745c09c0 100644 --- a/checks/check_extra742 +++ b/checks/check_extra742 @@ -26,7 +26,7 @@ extra742(){ textInfo "Looking for secrets in CloudFormation output across all regions... " for regx in $REGIONS; do - CFN_STACKS=$($AWSCLI cloudformation describe-stacks $PROFILE_OPT --region $regx) + CFN_STACKS=$($AWSCLI cloudformation describe-stacks $PROFILE_OPT --region $regx --output json) LIST_OF_CFN_STACKS=$(echo $CFN_STACKS | jq -r '.Stacks[].StackName') if [[ $LIST_OF_CFN_STACKS ]];then for stack in $LIST_OF_CFN_STACKS; do