mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-11 07:15:15 +00:00
33 lines
1.6 KiB
Bash
33 lines
1.6 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_check18="1.8"
|
|
CHECK_TITLE_check18="[check18] Ensure IAM password policy require at least one number (Scored)"
|
|
CHECK_SCORED_check18="SCORED"
|
|
CHECK_TYPE_check18="LEVEL1"
|
|
CHECK_SEVERITY_check18="Medium"
|
|
CHECK_ASFF_TYPE_check18="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
|
|
CHECK_ALTERNATE_check108="check18"
|
|
CHECK_SERVICENAME_check18="iam"
|
|
CHECK_RISK_check18='Password policies are used to enforce password complexity requirements. IAM password policies can be used to ensure password are comprised of different character sets. It is recommended that the password policy require at least one uppercase letter.'
|
|
CHECK_REMEDIATION_check18='Ensure "Require at least one number " is checked under "Password Policy".'
|
|
CHECK_DOC_check18='https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_account-policy.html'
|
|
CHECK_CAF_EPIC_check18='IAM'
|
|
|
|
check18(){
|
|
# "Ensure IAM password policy require at least one number (Scored)"
|
|
COMMAND18=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --output json --query 'PasswordPolicy.RequireNumbers' 2> /dev/null) # must be true
|
|
if [[ "$COMMAND18" == "true" ]];then
|
|
textPass "Password Policy requires number"
|
|
else
|
|
textFail "Password Policy missing number requirement"
|
|
fi
|
|
}
|