turbot/azure_compliance

Query: servicebus_namespace_no_overly_permissive_network_access

Usage

powerpipe query azure_compliance.query.servicebus_namespace_no_overly_permissive_network_access

SQL

select
a.id as resource,
case
when status = 'Active'
and sku_tier = 'Premium'
and network_rule_set -> 'properties' ->> 'defaultAction' = 'Allow'
and network_rule_set -> 'properties' ->> 'publicNetworkAccess' = 'Enabled' then 'alarm'
else 'ok'
end as status,
case
when status = 'Active'
and sku_tier = 'Premium'
and network_rule_set -> 'properties' ->> 'defaultAction' = 'Allow'
and network_rule_set -> 'properties' ->> 'publicNetworkAccess' = 'Enabled' then a.name || ' namespace configured with overly permissive network access.'
else a.name || ' namespace not configured with overly permissive network access.'
end as reason
, a.resource_group as resource_group
, sub.display_name as subscription
from
azure_servicebus_namespace a,
azure_subscription sub;

Controls

The query is being used by the following controls: