turbot/steampipe-mod-aws-compliance

Control: EKS clusters endpoint should restrict public access

Description

Ensure whether AWS Elastic Kubernetes Service (AWS EKS) endpoint is not publicly accessible. The rule is compliant if the endpoint is publicly accessible.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.eks_cluster_endpoint_restrict_public_access

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.eks_cluster_endpoint_restrict_public_access --share

SQL

This control uses a named query:

select
arn as resource,
case
when resources_vpc_config ->> 'EndpointPublicAccess' = 'true' then 'alarm'
else 'ok'
end as status,
case
when resources_vpc_config ->> 'EndpointPublicAccess' = 'true' then title || ' endpoint publicly accessible.'
else title || ' endpoint not publicly accessible.'
end as reason
, region, account_id
from
aws_eks_cluster;

Tags