Ensure that default security groups restrict all traffic to prevent unauthorized access to cloud resources.
Risk
Security groups with rules that allow open CIDR ranges (0.0.0.0/0 or ::/0) expose resources to traffic from any source on the internet. This significantly increases the attack surface and can lead to unauthorized access, data exfiltration, or service disruption.
prowler huaweicloud --checks vpc_default_security_group_restricts_all_traffic
Recommendation
Remove or restrict security group rules that allow traffic from open CIDR ranges (0.0.0.0/0 or ::/0). Default security groups should not allow unrestricted inbound or outbound traffic.
Remediation
hcloud VPC DeleteSecurityGroupRule --security_group_rule_id=<rule_id>
- Log on to the Huawei Cloud console
- Navigate to VPC > Security Groups
- Select the default security group
- Review and delete any rules with
0.0.0.0/0or::/0as the source/destination - Add restrictive rules as needed
Source Code
Resource Type
NotDefined