Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(eks_endpoints_not_publicly_accessible): handle endpoint private access #2825

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def execute(self):
report.status_extended = (
f"Cluster endpoint access is private for EKS cluster {cluster.name}."
)
if cluster.endpoint_public_access and not cluster.endpoint_private_access:
if cluster.endpoint_public_access:
report.status = "FAIL"
report.status_extended = (
f"Cluster endpoint access is public for EKS cluster {cluster.name}."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def test_endpoint_public_access(self):
)
assert result[0].resource_id == cluster_name
assert result[0].resource_arn == cluster_arn
assert result[0].resource_tags == []
assert result[0].region == AWS_REGION

def test_endpoint_not_public_access(self):
eks_client = mock.MagicMock
Expand Down Expand Up @@ -91,3 +93,5 @@ def test_endpoint_not_public_access(self):
)
assert result[0].resource_id == cluster_name
assert result[0].resource_arn == cluster_arn
assert result[0].resource_tags == []
assert result[0].region == AWS_REGION