turbot/steampipe-mod-aws-compliance

Query: guardduty_detector_ec2_malware_protection_enabled

Usage

powerpipe query aws_compliance.query.guardduty_detector_ec2_malware_protection_enabled

Steampipe Tables

SQL

with ec2_malware_protection as (
select
arn
from
aws_guardduty_detector,
jsonb_array_elements(features) as f
where
f ->> 'Name' = 'EBS_MALWARE_PROTECTION'
and f ->> 'Status' = 'ENABLED'
)
select
d.arn as resource,
case
when m.arn is not null then 'ok'
else 'alarm'
end as status,
case
when m.arn is not null then title || ' has EC2 malware protection enabled.'
else title || ' has EC2 malware protection disabled.'
end as reason
, region, account_id
from
aws_guardduty_detector as d
left join ec2_malware_protection as m on m.arn = d.arn

Controls

The query is being used by the following controls: