mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-12 14:34:16 +00:00
Fix listing EC2 Security Groups if default output format is not JSON
This commit is contained in:
1 parent
0878511abf
commit
a0c58e1cb2
1 file changed
+1
-1
@@ -24,7 +24,7 @@ extra75(){
|
||||
textInfo "Looking for Security Groups in all regions... "
|
||||
|
||||
for regx in $REGIONS; do
|
||||
SECURITYGROUPS=$($AWSCLI ec2 describe-security-groups $PROFILE_OPT --region $regx --max-items $MAXITEMS | jq '.SecurityGroups|map({(.GroupId): (.GroupName)})|add')
|
||||
SECURITYGROUPS=$($AWSCLI ec2 describe-security-groups $PROFILE_OPT --region $regx --max-items $MAXITEMS --output json | jq '.SecurityGroups|map({(.GroupId): (.GroupName)})|add')
|
||||
if [[ $SECURITYGROUPS == "null" ]];
|
||||
then
|
||||
continue
|
||||
|
||||
Reference in new issue
Block a user