Control: Check if BigQuery datasets are publicly readable
Usage
Run the control in your terminal:
powerpipe control run gcp_compliance.control.require_bq_table_iam
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run gcp_compliance.control.require_bq_table_iam --share
SQL
This control uses a named query:
select self_link resource, case when access @> '[{"specialGroup": "allAuthenticatedUsers"}]' or access @> '[{"iamMember": "allUsers"}]' then 'alarm' else 'ok' end as status, case when access @> '[{"specialGroup": "allAuthenticatedUsers"}]' or access @> '[{"iamMember": "allUsers"}]' then title || ' publicly accessible.' else title || ' not anonymously or publicly accessible.' end as reason , location as location, project as projectfrom gcp_bigquery_dataset;