turbot/ibm_compliance

Query: iam_user_with_valid_email

Usage

powerpipe query ibm_compliance.query.iam_user_with_valid_email

Steampipe Tables

SQL

select
iam_id as resource,
case
when email !~ '^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+[.][A-Za-z]+$' and email is null then 'alarm'
else 'ok'
end as status,
case
when email !~ '^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+[.][A-Za-z]+$' and email is null then first_name || ' ' || last_name || ' has valid email.'
else first_name || ' ' || last_name || ' has valid email.'
end as reason,
account_id
from
ibm_iam_user;

Controls

The query is being used by the following controls: