turbot/guardrails_insights

Query: controls_summary

Usage

powerpipe query guardrails_insights.query.controls_summary

Steampipe Tables

SQL

select
'Count' as "Controls",
sum((controls -> 'summary' -> 'control' ->> 'total')::int) as "Total",
sum((controls -> 'summary' -> 'control' ->> 'error')::int) as "Error",
sum((controls -> 'summary' -> 'control' ->> 'invalid')::int) as "Invalid",
sum((controls -> 'summary' -> 'control' ->> 'tbd')::int) as "TBD"
from
guardrails_query,
jsonb_array_elements(output -> 'controlSummariesByResource' -> 'items') as controls
where
query = '{
controlSummariesByResource {
items {
summary {
control {
total
error
invalid
tbd
}
}
}
}
}';

Dashboards

The query is used in the dashboards: