turbot/terraform_aws_compliance

Query: ecr_repository_use_image_scanning

Usage

powerpipe query terraform_aws_compliance.query.ecr_repository_use_image_scanning

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'image_scanning_configuration' ->> 'scan_on_push')::boolean then 'ok'
else 'alarm'
end as status,
split_part(address, '.', 2) || case
when (attributes_std -> 'image_scanning_configuration' ->> 'scan_on_push')::boolean then ' uses image scanning'
else ' does not use image scanning'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_ecr_repository';

Controls

The query is being used by the following controls: