Control: Check if Cloud Storage buckets have Bucket Only Policy turned on
Usage
Run the control in your terminal:
powerpipe control run gcp_compliance.control.require_bucket_policy_only
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run gcp_compliance.control.require_bucket_policy_only --share
SQL
This control uses a named query:
select self_link resource, case when iam_configuration_bucket_policy_only_enabled then 'ok' else 'alarm' end as status, case when iam_configuration_bucket_policy_only_enabled then title || ' bucket only policy turned on.' else title || ' bucket only policy turned off' end as reason , location as location, project as projectfrom gcp_storage_bucket;