turbot/docker_compliance

Query: docker_container_mount_propagation_mode_shared

Usage

powerpipe query docker_compliance.query.docker_container_mount_propagation_mode_shared

Steampipe Tables

SQL

select
distinct c.id as resource,
case
when m.id is null then 'ok'
else 'alarm'
end as status,
case
when m.id is null then (names ->> 0) || ' mount propagation mode not shared.'
else (names ->> 0) || ' mount propagation mode shared.'
end as reason
, _ctx ->> 'connection_name' as connection_name
from
docker_container as c
left join (
select distinct id
from docker_container,
jsonb_array_elements(mounts) as m
where m ->> 'Propagation' = 'shared'
) as m on c.id = m.id;

Controls

The query is being used by the following controls: