[Bug]: ec2_securitygroup_default_restrict_traffic Triggers on unused, default security groups #4132
Labels
bug
provider/aws
Issues/PRs related with the AWS provider
severity/low
Bug won't result in any noticeable breakdown of the execution.
Steps to Reproduce
Run a prowler aws scan that includes the
ec2_securitygroup_default_restrict_traffic
check against a new account with no resources configured:Expected behavior
The AWS check
ec2_securitygroup_default_restrict_traffic
should not produceFAIL
findings, as there are no resources subject to a security group and no security groups have been created by the user.Actual Result with Screenshots or Logs
Prowler produces a
FAIL
result for every default security group of every default VPC.The VPCs are completely unused and do not even have a public IP.
How did you install Prowler?
Cloning the repository from github.com (git clone)
Environment Resource
Workstation
OS used
macOS
Prowler version
4.1.0
Pip version
24.0
Context
AWS automatically creates a default VPC in every region. For every VPC, AWS creates a default security group.
The default security group has no ingress or egress rules associated with it -- it allows all traffic.
However,
a) the VPC is unused by default,
b) the VPC does not automatically have a public IP associated with it, even if it contains resources,
c) security groups are just one way to restrict access to resources in AWS, not the only one
I don't think it's sensible to produce ~20
High
FAIL
s for an empty AWS account.Note: a previous version of this check instead checked if the security group "is open to the Internet". In some sense, this makes more sense to me. See #2761 for background on why this was changed.
The text was updated successfully, but these errors were encountered: