Check provider logo

Confidential-workload host does not expose non-standard ports to the internet

ec2_confidential_workload_host_unrestricted_ingress

Severityhigh
Serviceec2
by Prowler

Hosts of Nitro Enclave workloads are evaluated for unrestricted ingress (0.0.0.0/0 or ::/0) on TCP/UDP ports outside a configurable allow-list (enclave_sg_allow_ports, default [22, 80, 443]). Aggregates ingress across every security group attached to the host. Assesses the host environment only.

Risk

Overly permissive security groups expose the host to lateral movement and to attackers probing high-port services. The host's I/O path is the enclave's I/O path over vsock, so exposed proxy ports on the host translate to exposed enclave communication channels.

Run this check with Prowler CLI

prowler aws --checks ec2_confidential_workload_host_unrestricted_ingress

Recommendation

Apply least-exposure to confidential-workload hosts: restrict internet-facing ingress to the minimum set of standard ports the workload actually needs, and prefer security-group-to-security-group references for internal services.

Remediation

CLI

aws ec2 revoke-security-group-ingress --group-id <sg-id> --protocol tcp --port <port> --cidr 0.0.0.0/0

Native IaC
Terraform
Other
  1. Enumerate the security groups attached to each confidential-workload host.
  2. For each rule that allows 0.0.0.0/0 or ::/0 ingress on a port outside {22, 80, 443}, restrict the source to a private CIDR or a peer security group.
  3. Prefer SG-to-SG references over CIDR-based ingress for internal services.

Source Code

Resource Type

AwsEc2Instance

References