mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-11 07:15:15 +00:00
29 lines
1.1 KiB
Bash
29 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
|
#
|
|
# This Prowler check is licensed under a
|
|
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
|
#
|
|
# You should have received a copy of the license along with this
|
|
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
|
|
|
CHECK_ID_check113="1.13"
|
|
CHECK_TITLE_check113="[check113] Ensure MFA is enabled for the root account (Scored)"
|
|
CHECK_SCORED_check113="SCORED"
|
|
CHECK_TYPE_check113="LEVEL1"
|
|
CHECK_SEVERITY_check113="Critical"
|
|
CHECK_ASFF_TYPE_check113="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
|
|
CHECK_ALTERNATE_check113="check113"
|
|
CHECK_SERVICENAME_check113="iam"
|
|
|
|
check113(){
|
|
# "Ensure MFA is enabled for the root account (Scored)"
|
|
COMMAND113=$($AWSCLI iam get-account-summary $PROFILE_OPT --region $REGION --output json --query 'SummaryMap.AccountMFAEnabled')
|
|
if [ "$COMMAND113" == "1" ]; then
|
|
textPass "Virtual MFA is enabled for root"
|
|
else
|
|
textFail "MFA is not ENABLED for root account"
|
|
fi
|
|
}
|