turbot/kubernetes_compliance

Query: pod_volume_host_path

Usage

powerpipe query kubernetes_compliance.query.pod_volume_host_path

Steampipe Tables

SQL

select
distinct(coalesce(uid, concat(path, ':', start_line))) as resource,
case
when v -> 'hostPath' -> 'path' is null then 'ok'
else 'alarm'
end as status,
case
when v -> 'hostPath' -> 'path' is null then 'No host path volume mounted.'
else 'Host path volume mounted for ' || (v ->> 'name') || '.'
end as reason,
name as pod_name
, coalesce(context_name, '') as context_name, namespace, source_type, coalesce(path || ':' || start_line || '-' || end_line, '') as path
from
kubernetes_pod,
jsonb_array_elements(volumes) as v;

Controls

The query is being used by the following controls: