mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 23:05:05 +00:00
24 lines
1022 B
Plaintext
24 lines
1022 B
Plaintext
CHECK_ID_extra713="7.13"
|
|
CHECK_TITLE_extra713="Check if GuardDuty is enabled (Not Scored) (Not part of CIS benchmark)"
|
|
CHECK_SCORED_extra713="NOT_SCORED"
|
|
CHECK_ALTERNATE_check713="extra713"
|
|
|
|
extra713(){
|
|
# "Check if GuardDuty is enabled (Not Scored) (Not part of CIS benchmark)"
|
|
for regx in $REGIONS; do
|
|
LIST_OF_GUARDDUTY_DETECTORS=$($AWSCLI guardduty list-detectors $PROFILE_OPT --region $regx --output text |cut -f2)
|
|
if [[ $LIST_OF_GUARDDUTY_DETECTORS ]];then
|
|
while read -r detector;do
|
|
DETECTOR_ENABLED=$($AWSCLI guardduty get-detector --detector-id $detector $PROFILE_OPT --region $regx --output text| cut -f3|grep ENABLED)
|
|
if [[ $DETECTOR_ENABLED ]]; then
|
|
textPass "$regx: GuardDuty detector $detector enabled" "$regx"
|
|
else
|
|
textFail "$regx: GuardDuty detector $detector configured but suspended" "$regx"
|
|
fi
|
|
done <<< "$LIST_OF_GUARDDUTY_DETECTORS"
|
|
else
|
|
textFail "$regx: GuardDuty detector not configured!" "$regx"
|
|
fi
|
|
done
|
|
}
|