turbot/tailpipe-mod-gcp-audit-log-detections

Detection: IAM Organization Policy Updated

Overview

Detect when an IAM organization policy was updated in GCP. Organization policies enforce governance and compliance by restricting resource configurations, and unauthorized or unintended updates can weaken security and lead to policy violations. Monitoring these events ensures proper enforcement of organizational policies and prevents unauthorized modifications.

References:

Usage

Run the detection in your terminal:

powerpipe detection run gcp_audit_log_detections.detection.iam_organization_policy_updated

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe detection run gcp_audit_log_detections.detection.iam_organization_policy_updated --share

SQL

This detection uses a named query:

select
tp_timestamp as timestamp,
method_name as operation,
resource_name as resource,
authentication_info.principal_email as actor,
tp_source_ip as source_ip,
tp_index as project,
tp_id as source_id,
-- Create new aliases to preserve original row data
*
from
gcp_audit_log
where
method_name ilike 'cloudresourcemanager.v%.organizations.setiampolicy'
and severity != 'Error'
-- TODO: Do we need to check operation?
-- and (operation_src is null or operation_src.last = true)
order by
timestamp desc;

Tags