mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
fix(image): use getattr for registry credentials to avoid AttributeError
- Use getattr with None defaults for registry auth arguments - Credentials fall back to TRIVY_USERNAME/TRIVY_PASSWORD env vars in ImageProvider
This commit is contained in:
@@ -285,9 +285,9 @@ class Provider(ABC):
|
||||
timeout=arguments.timeout,
|
||||
config_path=arguments.config_file,
|
||||
fixer_config=fixer_config,
|
||||
registry_username=arguments.registry_username,
|
||||
registry_password=arguments.registry_password,
|
||||
registry_token=arguments.registry_token,
|
||||
registry_username=getattr(arguments, "registry_username", None),
|
||||
registry_password=getattr(arguments, "registry_password", None),
|
||||
registry_token=getattr(arguments, "registry_token", None),
|
||||
)
|
||||
elif "mongodbatlas" in provider_class_name.lower():
|
||||
provider_class(
|
||||
|
||||
Reference in New Issue
Block a user