mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 23:05:05 +00:00
33 lines
1.7 KiB
Bash
33 lines
1.7 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_check16="1.6"
|
|
CHECK_TITLE_check16="[check16] Ensure IAM password policy require at least one lowercase letter (Scored)"
|
|
CHECK_SCORED_check16="SCORED"
|
|
CHECK_TYPE_check16="LEVEL1"
|
|
CHECK_SEVERITY_check16="Medium"
|
|
CHECK_ASFF_TYPE_check16="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
|
|
CHECK_ALTERNATE_check106="check16"
|
|
CHECK_SERVICENAME_check16="iam"
|
|
CHECK_RISK_check16='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_check16='Ensure "Requires at least one lowercase letter" is checked under "Password Policy".'
|
|
CHECK_DOC_check16='https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_account-policy.html'
|
|
CHECK_CAF_EPIC_check16='IAM'
|
|
|
|
check16(){
|
|
# "Ensure IAM password policy require at least one lowercase letter (Scored)"
|
|
COMMAND16=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --output json --query 'PasswordPolicy.RequireLowercaseCharacters' 2> /dev/null) # must be true
|
|
if [[ "$COMMAND16" == "true" ]];then
|
|
textPass "Password Policy requires lower case"
|
|
else
|
|
textFail "Password Policy missing lower-case requirement"
|
|
fi
|
|
}
|