turbot/digitalocean_insights

Query: network_firewall_unrestricted_outbound_rules

Usage

powerpipe query digitalocean_insights.query.network_firewall_unrestricted_outbound_rules

Steampipe Tables

SQL

with outbound_fw as (
select
id
from
digitalocean_firewall,
jsonb_array_elements(outbound_rules) as i
where
i -> 'destinations' -> 'addresses' = '["0.0.0.0/0","::/0"]'
and i ->> 'protocol' <> 'icmp'
group by id
)
select
'Outbound (Excludes ICMP)' as label,
case when o.id is null then 'Restricted' else 'Unrestricted' end as value,
case when o.id is null then 'ok' else 'alert' end as type
from
digitalocean_firewall as d
left join outbound_fw as o on d.id = o.id
where
d.urn = $1;

Dashboards

The query is used in the dashboards: