fix(aws): fix logic in VPC and ELBv2 checks (#8077)

Co-authored-by: Sergio Garcia <sergargar1@gmail.com>
Co-authored-by: MrCloudSec <hello@mistercloudsec.com>
This commit is contained in:
crr
2025-06-24 20:13:54 +09:00
committed by GitHub
parent df1abb2152
commit e108b2caed
4 changed files with 13 additions and 6 deletions
+8 -1
View File
@@ -48,7 +48,14 @@ All notable changes to the **Prowler SDK** are documented in this file.
---
## [v5.7.5] (Prowler UNRELEASED)
## [v5.7.6] (Prowler UNRELEASED)
### Fixed
- Fix logic in VPC and ELBv2 checks [(#8077)](https://github.com/prowler-cloud/prowler/pull/8077)
---
## [v5.7.5] (Prowler 5.7.5)
### Fixed
- Use unified timestamp for all requirements [(#8059)](https://github.com/prowler-cloud/prowler/pull/8059)
@@ -12,7 +12,7 @@ class elbv2_desync_mitigation_mode(Check):
report.status_extended = f"ELBv2 ALB {lb.name} is configured with correct desync mitigation mode."
if (
lb.desync_mitigation_mode != "strictest"
or lb.desync_mitigation_mode != "defensive"
and lb.desync_mitigation_mode != "defensive"
):
if lb.drop_invalid_header_fields == "false":
report.status = "FAIL"
@@ -9,10 +9,10 @@ class vpc_endpoint_multi_az_enabled(Check):
if endpoint.vpc_id in vpc_client.vpcs and endpoint.type == "Interface":
report = Check_Report_AWS(metadata=self.metadata(), resource=endpoint)
report.status = "FAIL"
report.status_extended = f"VPC Endpoint {endpoint.id} in VPC {endpoint.vpc_id} has subnets in different AZs."
report.status_extended = f"VPC Endpoint {endpoint.id} in VPC {endpoint.vpc_id} does not have subnets in different AZs."
if len(endpoint.subnet_ids) > 1:
report.status = "PASS"
report.status_extended = f"VPC Endpoint {endpoint.id} in VPC {endpoint.vpc_id} does not have subnets in different AZs."
report.status_extended = f"VPC Endpoint {endpoint.id} in VPC {endpoint.vpc_id} has subnets in different AZs."
findings.append(report)
@@ -87,7 +87,7 @@ class Test_vpc_endpoint_for_multi_az:
assert result[0].status == "FAIL"
assert (
result[0].status_extended
== f"VPC Endpoint {vpc_endpoint['VpcEndpointId']} in VPC {vpc['VpcId']} has subnets in different AZs."
== f"VPC Endpoint {vpc_endpoint['VpcEndpointId']} in VPC {vpc['VpcId']} does not have subnets in different AZs."
)
assert (
result[0].resource_arn
@@ -158,7 +158,7 @@ class Test_vpc_endpoint_for_multi_az:
assert result[0].status == "PASS"
assert (
result[0].status_extended
== f"VPC Endpoint {vpc_endpoint['VpcEndpointId']} in VPC {vpc['VpcId']} does not have subnets in different AZs."
== f"VPC Endpoint {vpc_endpoint['VpcEndpointId']} in VPC {vpc['VpcId']} has subnets in different AZs."
)
assert (
result[0].resource_arn