mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 23:05:05 +00:00
22 lines
1.1 KiB
Plaintext
22 lines
1.1 KiB
Plaintext
CHECK_ID_extra711="7.11"
|
|
CHECK_TITLE_extra711="Check for Publicly Accessible Redshift Clusters (Not Scored) (Not part of CIS benchmark)"
|
|
CHECK_SCORED_extra711="NOT_SCORED"
|
|
CHECK_ALTERNATE_check711="extra711"
|
|
|
|
extra711(){
|
|
# "Check for Publicly Accessible Redshift Clusters (Not Scored) (Not part of CIS benchmark)"
|
|
textInfo "Looking for Reshift clusters in all regions... "
|
|
for regx in $REGIONS; do
|
|
LIST_OF_PUBLIC_REDSHIFT_CLUSTERS=$($AWSCLI redshift describe-clusters $PROFILE_OPT --region $regx --query 'Clusters[?PubliclyAccessible == `true`].[ClusterIdentifier,Endpoint.Address]' --output text)
|
|
if [[ $LIST_OF_PUBLIC_REDSHIFT_CLUSTERS ]];then
|
|
while read -r cluster;do
|
|
CLUSTER_ID=$(echo $cluster | awk '{ print $1; }')
|
|
CLUSTER_ENDPOINT=$(echo $cluster | awk '{ print $2; }')
|
|
textFail "$regx: Cluster: $CLUSTER_ID at Endpoint: $CLUSTER_ENDPOINT is publicly accessible!" "$regx"
|
|
done <<< "$LIST_OF_PUBLIC_REDSHIFT_CLUSTERS"
|
|
else
|
|
textPass "$regx: no Publicly Accessible Redshift Clusters found" "$regx"
|
|
fi
|
|
done
|
|
}
|