mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-11-08 12:24:45 +00:00
Improved AWS partition handle
This commit is contained in:
1 parent
684473327a
commit
1f949b4175
3 files changed
+21
-20
No files matched your search
@@ -40,6 +40,7 @@ extra788(){
|
||||
if [[ $CHECK_ES_DOMAIN_POLICY_HAS_CONDITION ]]; then
|
||||
# get content of IpAddress."aws:SourceIp" and get a clean list
|
||||
LIST_CONDITION_IPS=$(cat $TEMP_POLICY_FILE | jq '.Statement[0] .Condition.IpAddress."aws:SourceIp"'| awk -F'"' '{print $2}' | tr -d '",^$' | sed '/^$/d')
|
||||
unset CONDITION_HAS_PUBLIC_IP_ARRAY
|
||||
for condition_ip in "${LIST_CONDITION_IPS}";do
|
||||
CONDITION_HAS_PRIVATE_IP=$(echo "${condition_ip}" | grep -E '^(192\.168|10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.)')
|
||||
if [[ $CONDITION_HAS_PRIVATE_IP ]];then
|
||||
|
||||
Reference in new issue
Block a user