Detection: CloudWatch Log Group Created with Encryption Disabled
Overview
Detect when a CloudWatch log group was created without encryption enabled. Unencrypted logs increase the risk of unauthorized access to sensitive information, such as application secrets or personally identifiable information (PII). Enabling encryption ensures secure log storage and compliance with industry standards.
References:
Usage
Run the detection in your terminal:
powerpipe detection run aws_cloudtrail_log_detections.detection.cloudwatch_log_group_created_with_encryption_disabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe detection run aws_cloudtrail_log_detections.detection.cloudwatch_log_group_created_with_encryption_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 ->> 'logGroupName' 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_logwhere event_source = 'logs.amazonaws.com' and event_name = 'CreateLogGroup' and (request_parameters ->> 'kmsKeyId') is null and error_code is null
order by event_time desc;