Skip to content

prowler image --registry silently fails: registry arguments not forwarded to ImageProvider #10457

@eblume

Description

@eblume

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

  1. Install Prowler 5.22.0 (or current master)
  2. Set up any OCI-compatible registry with anonymous read access (e.g., zot, Harbor, or even Docker Hub)
  3. Run: prowler image --registry example.com --registry-list
  4. Observe: ImageNoImagesProvidedError[11000]: No images provided for scanning
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugprovider/imageIssues/PRs related with the Container Image providerseverity/highBug capable of collapsing large parts of the execution.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions