turbot/gcp_insights

Query: storage_bucket_by_public_access

Usage

powerpipe query gcp_insights.query.storage_bucket_by_public_access

Steampipe Tables

SQL

with bucket_access as (
select
case
when iam_policy ->> 'bindings' like any (array ['%allAuthenticatedUsers%','%allUsers%']) then 'public'
else 'private'
end as bucket_access_status
from
gcp_storage_bucket
)
select
bucket_access_status,
count(*)
from
bucket_access
group by
bucket_access_status;

Dashboards

The query is used in the dashboards: