turbot/aws_compliance

Query: ssm_document_prohibit_public_access

Usage

powerpipe query aws_compliance.query.ssm_document_prohibit_public_access

SQL

select
d.arn as resource,
case
when p.account_ids :: jsonb ? 'all' then 'alarm'
else 'ok'
end as status,
case
when p.account_ids :: jsonb ? 'all' then d.title || ' publicly accessible.'
else d.title || ' not publicly accessible.'
end as reason
, d.region, d.account_id
from
aws_ssm_document as d
left join aws_ssm_document_permission as p on p.document_name = d.name and p.region = d.region and p.account_id = d.account_id
where
d.owner_type = 'Self';

Controls

The query is being used by the following controls: