turbot/steampipe-mod-azure-compliance

Control: Container registries trust policy should be enabled

Description

Ensure container registry trust policy is enabled. This control is non-compliant if trust policy is disabled.

Usage

Run the control in your terminal:

powerpipe control run azure_compliance.control.container_registry_trust_policy_enabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run azure_compliance.control.container_registry_trust_policy_enabled --share

SQL

This control uses a named query:

select
distinct a.name as resource,
case
when policies -> 'trustPolicy' ->> 'status' = 'enabled' then 'ok'
else 'alarm'
end as status,
case
when policies -> 'trustPolicy' ->> 'status' = 'enabled' then a.name || ' trust policy enabled.'
else a.name || ' trust policy disabled.'
end as reason
, a.resource_group as resource_group
, sub.display_name as subscription
from
azure_container_registry as a,
azure_subscription as sub
where
sub.subscription_id = a.subscription_id;

Tags