Checks/Aws/Test-Ec2InstancePortSshExposedToInternet.ps1
|
function Test-Ec2InstancePortSshExposedToInternet { <# .SYNOPSIS EC2 instance does not allow ingress from the Internet to TCP port 22 (SSH) .DESCRIPTION **EC2 instances** with **SSH (TCP 22)** exposed to the Internet via security group inbound rules allowing `0.0.0.0/0` or `::/0`. Exposure is qualified using the instance's public IP status and subnet reachability. .PARAMETER Check CIEMCheck object containing check metadata. #> [CmdletBinding()] [OutputType([PSCustomObject[]])] param( [Parameter(Mandatory)] [CIEMCheck]$Check ) $ErrorActionPreference = 'Stop' # TODO: Implement check logic based on Prowler check: ec2_instance_port_ssh_exposed_to_internet [CIEMScanResult]::Create($Check, 'MANUAL', 'This check requires manual implementation. See Prowler check ec2_instance_port_ssh_exposed_to_internet for reference.', 'N/A', 'ec2 Resources') } |