turbot/kubernetes_insights

Query: container_allow_privilege_escalation_count

Usage

powerpipe query kubernetes_insights.query.container_allow_privilege_escalation_count

Steampipe Tables

SQL

select
count(c ->> 'name') as value,
'Privilege Escalation Enabled' as label,
case
count(c ->> 'name')
when 0 then 'ok'
else 'alert'
end as type
from
kubernetes_pod,
jsonb_array_elements(containers) as c
where
c -> 'securityContext' ->> 'allowPrivilegeEscalation' = 'true';

Dashboards

The query is used in the dashboards: