turbot/tailpipe-mod-aws-cloudtrail-log-detections

Detection: WAF Web ACL Logging Disabled

Overview

Detect when a Web Application Firewall (WAF) ACL had logging disabled. Disabling logging removes visibility into traffic patterns and potential threats, making it harder to detect and mitigate malicious activity. Enabling logging is critical to maintaining a strong security posture and supporting compliance with monitoring requirements.

References:

Usage

Run the detection in your terminal:

powerpipe detection run aws_cloudtrail_log_detections.detection.waf_web_acl_logging_disabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe detection run aws_cloudtrail_log_detections.detection.waf_web_acl_logging_disabled --share

SQL

This detection uses a named query:

select
tp_timestamp as timestamp,
string_split(event_source, '.')[1] || ':' || event_name as operation,
request_parameters ->> 'resourceArn' as resource,
user_identity.arn as actor,
tp_source_ip as source_ip,
tp_index as account_id,
aws_region as region,
tp_id as source_id,
*
from
aws_cloudtrail_log
where
event_source = 'wafv2.amazonaws.com'
and event_name in ('DeleteLoggingConfiguration', 'PutLoggingConfiguration')
and (request_parameters -> 'loggingConfiguration') is null
and error_code is null
order by
event_time desc;

Tags