-
Notifications
You must be signed in to change notification settings - Fork 2.1k
prowler image --registry silently fails: registry arguments not forwarded to ImageProvider #10457
Description
Issue search
- I have searched the existing issues and this bug has not been reported yet
Which component is affected?
Prowler CLI/SDK
Cloud Provider (if applicable)
Not applicable
Steps to Reproduce
- Install Prowler 5.22.0 (or current master)
- Set up any OCI-compatible registry with anonymous read access (e.g., zot, Harbor, or even Docker Hub)
- Run: prowler image --registry example.com --registry-list
- Observe: ImageNoImagesProvidedError[11000]: No images provided for scanning
- Verify the registry is accessible: curl -s https://example.com/v2/_catalog returns repositories
Expected behavior
Prowler enumerates repositories and tags from the registry.
Actual Result with Screenshots or Logs
Registry enumeration never runs. The --registry argument is parsed by the CLI but not forwarded to ImageProvider.init in init_global_provider (prowler/providers/common/provider.py), so self.registry is None and _enumerate_registry() is never called.
Note: The API/web UI code path is unaffected. api/src/backend/api/utils.py constructs ImageProvider kwargs directly and passes registry correctly. Only the CLI path through init_global_provider is broken.
How did you install Prowler?
Cloning the repository from github.com (git clone)
Environment Resource
Kubernetes CronJob (minikube on bare metal). custom container built from Prowler source, deployed via ArgoCD/kustomize.
OS used
Debian Bookworm (python:3.12-slim-bookworm container base)
Prowler version
Prowler 5.22.0
Python version
3.12.12
Pip version
pip 26.0.1
Context
Full analysis and fix available in #10470. PR #9985 added --registry support on Feb 19. PR #10128 accidentally removed the registry kwargs from init_global_provider on Feb 24, likely a merge conflict resolution error (I think). The CLI parses --registry and related flags but never forwards them to ImageProvider.init.