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

Detection: RDS DB Cluster Deletion Protection Disabled

Overview

Detect when an Amazon RDS database cluster had deletion protection disabled. Disabling deletion protection increases the risk of accidental or malicious deletions, potentially resulting in data loss, downtime, and operational disruptions. Enabling deletion protection helps maintain the integrity, availability, and resilience of critical database clusters.

References:

Usage

Run the detection in your terminal:

powerpipe detection run aws_cloudtrail_log_detections.detection.rds_db_cluster_deletion_protection_disabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe detection run aws_cloudtrail_log_detections.detection.rds_db_cluster_deletion_protection_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 ->> 'dBClusterIdentifier' 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 = 'rds.amazonaws.com'
and event_name = 'ModifyDBCluster'
and (request_parameters -> 'deletionProtection') = false
and error_code is null
order by
event_time desc;

Tags