Find security groups with more than 50 ingress or egress rules.
Risk
If Security groups are not properly configured the attack surface is increased.
Run this check with Prowler CLI
prowler aws --checks ec2_securitygroup_with_many_ingress_egress_rules
ARN template
arn:partition:service:region:account-id:resource-id
Remediation
WUIReferences:
Use a Zero Trust approach. Narrow ingress traffic as much as possible. Consider north-south as well as east-west traffic.
Source Code
Resource Type
AwsEc2SecurityGroup