turbot/steampipe-mod-aws-compliance

Query: guardduty_detector_eks_audit_log_monitoring_enabled

Usage

powerpipe query aws_compliance.query.guardduty_detector_eks_audit_log_monitoring_enabled

Steampipe Tables

SQL

with eks_audit_log_monitoring as (
select
arn
from
aws_guardduty_detector,
jsonb_array_elements(features) as f
where
f ->> 'Name' = 'EKS_AUDIT_LOGS'
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 EKS audit log monitoring enabled.'
else title || ' has EKS audit log monitoring disabled.'
end as reason
, region, account_id
from
aws_guardduty_detector as d
left join eks_audit_log_monitoring as m on m.arn = d.arn

Controls

The query is being used by the following controls: