fix(securityhub): findings not being imported or archived in non-aws partitions (#3040)

Co-authored-by: Pepe Fagoaga <pepe@verica.io>
This commit is contained in:
Johnny Lu
2023-11-16 02:27:28 -08:00
committed by GitHub
parent 19c2dccc6d
commit 9205ef30f8
4 changed files with 9 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ AWS_REGION_EU_WEST_2 = "eu-west-2"
AWS_PARTITION = "aws"
AWS_ACCOUNT_NUMBER = "123456789012"
AWS_ACCOUNT_ARN = f"arn:aws:iam::{AWS_ACCOUNT_NUMBER}:root"
AWS_COMMERCIAL_PARTITION = "aws"
# Mocked AWS Audit Info

View File

@@ -15,6 +15,7 @@ from prowler.providers.aws.lib.security_hub.security_hub import (
)
from tests.providers.aws.audit_info_utils import (
AWS_ACCOUNT_NUMBER,
AWS_COMMERCIAL_PARTITION,
AWS_REGION_EU_WEST_1,
AWS_REGION_EU_WEST_2,
set_mocked_aws_audit_info,
@@ -80,7 +81,7 @@ class Test_SecurityHub:
def test_verify_security_hub_integration_enabled_per_region(self):
session = self.set_mocked_session(AWS_REGION_EU_WEST_1)
assert verify_security_hub_integration_enabled_per_region(
AWS_REGION_EU_WEST_1, session, AWS_ACCOUNT_NUMBER
AWS_COMMERCIAL_PARTITION, AWS_REGION_EU_WEST_1, session, AWS_ACCOUNT_NUMBER
)
def test_prepare_security_hub_findings_enabled_region_not_quiet(self):