turbot/azure_insights

Query: sql_database_vulnerability_assessment_disabled_count

Usage

powerpipe query azure_insights.query.sql_database_vulnerability_assessment_disabled_count

Steampipe Tables

SQL

with sql_database_va as (
select
distinct id
from
azure_sql_database as s,
jsonb_array_elements(vulnerability_assessments) as va
where
va -> 'properties' -> 'recurringScans' ->> 'isEnabled' = 'true'
)
select
count(*) as value,
'Vulnerability Assessment Disabled' as label,
case count(*) when 0 then 'ok' else 'alert' end as type
from
azure_sql_database as d where d.id not in (select id from sql_database_va);

Dashboards

The query is used in the dashboards: