Skip to content

Commit

Permalink
fix(mutelist): set arguments while loading providers (#5653)
Browse files Browse the repository at this point in the history
Co-authored-by: Pepe Fagoaga <[email protected]>
  • Loading branch information
thomscode and jfagoagas authored Nov 7, 2024
1 parent bf4db86 commit a2929f2
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions prowler/providers/common/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,54 +161,54 @@ def init_global_provider(arguments: Namespace) -> None:
if not isinstance(Provider._global, provider_class):
if "aws" in provider_class_name.lower():
provider_class(
arguments.aws_retries_max_attempts,
arguments.role,
arguments.session_duration,
arguments.external_id,
arguments.role_session_name,
arguments.mfa,
arguments.profile,
set(arguments.region) if arguments.region else None,
arguments.organizations_role,
arguments.scan_unused_services,
arguments.resource_tag,
arguments.resource_arn,
arguments.config_file,
arguments.mutelist_file,
retries_max_attempts=arguments.aws_retries_max_attempts,
role_arn=arguments.role,
session_duration=arguments.session_duration,
external_id=arguments.external_id,
role_session_name=arguments.role_session_name,
mfa=arguments.mfa,
profile=arguments.profile,
regions=set(arguments.region) if arguments.region else None,
organizations_role_arn=arguments.organizations_role,
scan_unused_services=arguments.scan_unused_services,
resource_tags=arguments.resource_tag,
resource_arn=arguments.resource_arn,
config_path=arguments.config_file,
mutelist_path=arguments.mutelist_file,
fixer_config=fixer_config,
)
elif "azure" in provider_class_name.lower():
provider_class(
arguments.az_cli_auth,
arguments.sp_env_auth,
arguments.browser_auth,
arguments.managed_identity_auth,
arguments.tenant_id,
arguments.azure_region,
arguments.subscription_id,
arguments.config_file,
arguments.mutelist_file,
az_cli_auth=arguments.az_cli_auth,
sp_env_auth=arguments.sp_env_auth,
browser_auth=arguments.browser_auth,
managed_identity_auth=arguments.managed_identity_auth,
tenant_id=arguments.tenant_id,
region=arguments.azure_region,
subscription_ids=arguments.subscription_id,
config_path=arguments.config_file,
mutelist_path=arguments.mutelist_file,
fixer_config=fixer_config,
)
elif "gcp" in provider_class_name.lower():
provider_class(
arguments.organization_id,
arguments.project_id,
arguments.excluded_project_id,
arguments.credentials_file,
arguments.impersonate_service_account,
arguments.list_project_id,
arguments.config_file,
arguments.mutelist_file,
organization_id=arguments.organization_id,
project_ids=arguments.project_id,
excluded_project_ids=arguments.excluded_project_id,
credentials_file=arguments.credentials_file,
impersonate_service_account=arguments.impersonate_service_account,
list_project_ids=arguments.list_project_id,
config_path=arguments.config_file,
mutelist_path=arguments.mutelist_file,
fixer_config=fixer_config,
)
elif "kubernetes" in provider_class_name.lower():
provider_class(
arguments.kubeconfig_file,
arguments.context,
arguments.namespace,
arguments.config_file,
arguments.mutelist_file,
kubeconfig_file=arguments.kubeconfig_file,
context=arguments.context,
namespace=arguments.namespace,
config_path=arguments.config_file,
mutelist_path=arguments.mutelist_file,
fixer_config=fixer_config,
)

Expand Down

0 comments on commit a2929f2

Please sign in to comment.