mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-04 02:04:06 +00:00
fix: handle empty input regions (#4841)
This commit is contained in:
@@ -79,7 +79,7 @@ class AwsProvider(Provider):
|
||||
# MFA Configuration (false by default)
|
||||
input_mfa = getattr(arguments, "mfa", None)
|
||||
input_profile = getattr(arguments, "profile", None)
|
||||
input_regions = set(getattr(arguments, "region", set()))
|
||||
input_regions = set(getattr(arguments, "region", []) or [])
|
||||
organizations_role_arn = getattr(arguments, "organizations_role", None)
|
||||
|
||||
# Set if unused services must be scanned
|
||||
|
||||
@@ -758,6 +758,14 @@ aws:
|
||||
assert aws_provider.mutelist.mutelist == mutelist["Mutelist"]
|
||||
assert aws_provider.mutelist.mutelist_file_path == dynamodb_mutelist_path
|
||||
|
||||
@mock_aws
|
||||
def test_empty_input_regions_in_arguments(self):
|
||||
arguments = Namespace()
|
||||
arguments.region = None
|
||||
aws_provider = AwsProvider(arguments)
|
||||
|
||||
assert isinstance(aws_provider, AwsProvider)
|
||||
|
||||
@mock_aws
|
||||
def test_generate_regional_clients_all_enabled_regions(self):
|
||||
arguments = Namespace()
|
||||
|
||||
Reference in New Issue
Block a user