mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 12:31:54 +00:00
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:
@@ -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)
|
||||
|
||||
+1
-1
@@ -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"
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user