turbot/steampipe-mod-terraform-aws-compliance

Control: Ensure IAM password policy requires at least one number

Description

Password policies, in part, enforce password complexity requirements. Use IAM password policies to ensure that passwords use different character sets.

Usage

Run the control in your terminal:

powerpipe control run terraform_aws_compliance.control.iam_account_password_policy_one_number

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run terraform_aws_compliance.control.iam_account_password_policy_one_number --share

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std -> 'require_numbers') is null then 'alarm'
when (attributes_std -> 'require_numbers')::bool then 'ok'
else 'alarm'
end as status,
split_part(address, '.', 2) || case
when (attributes_std -> 'require_numbers') is null then ' number not set to required'
when (attributes_std -> 'require_numbers')::bool then ' number set to required'
else ' number not set to required'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_iam_account_password_policy';

Tags