turbot/azure_insights

Query: sql_database_vulnerability_assessment_enabled

Usage

powerpipe query azure_insights.query.sql_database_vulnerability_assessment_enabled

Steampipe Tables

SQL

with sql_database_va as (
select
distinct id
from
azure_sql_database as d,
jsonb_array_elements(vulnerability_assessments) as va
where
va -> 'properties' -> 'recurringScans' ->> 'isEnabled' = 'true'
)
select
'Vulnerability Assessment' as label,
case when v.id is not null then 'Enabled' else 'Disabled' end as value,
case when v.id is not null then 'ok' else 'alert' end as type
from
azure_sql_database as d left join sql_database_va as v on lower(v.id) = lower(d.id)
where
lower(d.id) = $1
and d.subscription_id = split_part($1, '/', 3);

Dashboards

The query is used in the dashboards: