mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
fix(network_azure): handle capitalized protocols in security group rules (#3808)
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ class network_http_internet_access_restricted(Check):
|
||||
and int(rule.destination_port_range.split("-")[1]) >= 80
|
||||
)
|
||||
)
|
||||
and rule.protocol in ["TCP", "*"]
|
||||
and rule.protocol in ["TCP", "Tcp", "*"]
|
||||
and rule.source_address_prefix in ["Internet", "*", "0.0.0.0/0"]
|
||||
and rule.access == "Allow"
|
||||
and rule.direction == "Inbound"
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class network_rdp_internet_access_restricted(Check):
|
||||
and int(rule.destination_port_range.split("-")[1]) >= 3389
|
||||
)
|
||||
)
|
||||
and rule.protocol in ["TCP", "*"]
|
||||
and rule.protocol in ["TCP", "Tcp", "*"]
|
||||
and rule.source_address_prefix in ["Internet", "*", "0.0.0.0/0"]
|
||||
and rule.access == "Allow"
|
||||
and rule.direction == "Inbound"
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class network_ssh_internet_access_restricted(Check):
|
||||
and int(rule.destination_port_range.split("-")[1]) >= 22
|
||||
)
|
||||
)
|
||||
and rule.protocol in ["TCP", "*"]
|
||||
and rule.protocol in ["TCP", "Tcp", "*"]
|
||||
and rule.source_address_prefix in ["Internet", "*", "0.0.0.0/0"]
|
||||
and rule.access == "Allow"
|
||||
and rule.direction == "Inbound"
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ class network_udp_internet_access_restricted(Check):
|
||||
report.location = security_group.location
|
||||
report.status_extended = f"Security Group {security_group.name} from subscription {subscription} has UDP internet access restricted."
|
||||
rule_fail_condition = any(
|
||||
rule.protocol in ["UDP"]
|
||||
rule.protocol in ["UDP", "Udp"]
|
||||
and rule.source_address_prefix in ["Internet", "*", "0.0.0.0/0"]
|
||||
and rule.access == "Allow"
|
||||
and rule.direction == "Inbound"
|
||||
|
||||
Reference in New Issue
Block a user