From a2929f2efb47d7f5b30aa50999a204ea57b1968e Mon Sep 17 00:00:00 2001 From: thomscode Date: Thu, 7 Nov 2024 06:12:29 -0800 Subject: [PATCH] fix(mutelist): set arguments while loading providers (#5653) Co-authored-by: Pepe Fagoaga --- prowler/providers/common/provider.py | 72 ++++++++++++++-------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/prowler/providers/common/provider.py b/prowler/providers/common/provider.py index 3681cdcc262..4e86ad42bbf 100644 --- a/prowler/providers/common/provider.py +++ b/prowler/providers/common/provider.py @@ -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, )