turbot/steampipe-mod-aws-compliance

Control: WAF global web ACL should have at least one rule or rule group

Description

This control checks whether WAF global web ACL contains at least one WAF rule or WAF rule group. The control fails if a web ACL does not contain any WAF rules or rule groups.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.waf_web_acl_rule_attached

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.waf_web_acl_rule_attached --share

SQL

This control uses a named query:

select
arn as resource,
case
when rules is null or jsonb_array_length(rules) = 0 then 'alarm'
else 'ok'
end as status,
case
when rules is null or jsonb_array_length(rules) = 0 then title || ' has no attached rules.'
else title || ' has ' || jsonb_array_length(rules) || ' rule(s) attached.'
end as reason
, region, account_id
from
aws_waf_web_acl;

Tags