mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 14:55:00 +00:00
populated checks
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
CHECK_ID_check_extra723=""
|
||||
CHECK_TITLE_check_extra723=""
|
||||
CHECK_SCORED_check_extra723=""
|
||||
CHECK_TYPE_check_extra723=""
|
||||
CHECK_ALTERNATE_check_extra723="check_extra723"
|
||||
|
||||
extra723(){
|
||||
# "Check if RDS Snapshots are public (Not Scored) (Not part of CIS benchmark)"
|
||||
textTitle "$ID723" "$TITLE723" "NOT_SCORED" "EXTRA"
|
||||
for regx in $REGIONS; do
|
||||
# RDS snapshots
|
||||
LIST_OF_RDS_SNAPSHOTS=$($AWSCLI rds describe-db-snapshots $PROFILE_OPT --region $regx --query DBSnapshots[*].DBSnapshotIdentifier --output text)
|
||||
if [[ $LIST_OF_RDS_SNAPSHOTS ]]; then
|
||||
for rdssnapshot in $LIST_OF_RDS_SNAPSHOTS;do
|
||||
SNAPSHOT_IS_PUBLIC=$($AWSCLI rds describe-db-snapshot-attributes $PROFILE_OPT --region $regx --db-snapshot-identifier $rdssnapshot --query DBSnapshotAttributesResult.DBSnapshotAttributes[*] --output text|grep ^ATTRIBUTEVALUES|cut -f2|grep all)
|
||||
if [[ $SNAPSHOT_IS_PUBLIC ]];then
|
||||
textWarn "$regx: RDS Snapshot $rdssnapshot is public!" "$regx"
|
||||
else
|
||||
textOK "$regx: RDS Snapshot $rdssnapshot is not shared" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textNotice "$regx: No RDS Snapshots found" "$regx"
|
||||
fi
|
||||
# RDS cluster snapshots
|
||||
LIST_OF_RDS_CLUSTER_SNAPSHOTS=$($AWSCLI rds describe-db-cluster-snapshots $PROFILE_OPT --region $regx --query DBClusterSnapshots[*].DBClusterSnapshotIdentifier --output text)
|
||||
if [[ $LIST_OF_RDS_CLUSTER_SNAPSHOTS ]]; then
|
||||
for rdsclustersnapshot in $LIST_OF_RDS_CLUSTER_SNAPSHOTS;do
|
||||
CLUSTER_SNAPSHOT_IS_PUBLIC=$($AWSCLI rds describe-db-cluster-snapshot-attributes $PROFILE_OPT --region $regx --db-cluster-snapshot-identifier $rdsclustersnapshot --query DBClusterSnapshotAttributesResult.DBClusterSnapshotAttributes[*] --output text|grep ^ATTRIBUTEVALUES|cut -f2|grep all)
|
||||
if [[ $CLUSTER_SNAPSHOT_IS_PUBLIC ]];then
|
||||
textWarn "$regx: RDS Cluster Snapshot $rdsclustersnapshot is public!" "$regx"
|
||||
else
|
||||
textOK "$regx: RDS Cluster Snapshot $rdsclustersnapshot is not shared" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textNotice "$regx: No RDS Cluster Snapshots found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user