Skip to content

prowler image --registry-list crashes with AttributeError: 'NoneType' object has no attribute 'print_credentials' #10690

@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

prowler image --registry https://any-registry.example.com --registry-list

Expected behavior

lists repositories and tags, then exits cleanly.

Actual Result with Screenshots or Logs

When run as prowler image --registry https://registry.ops.eblu.me --image-filter "^blumeops/" --registry-list --no-color:

                         _
 _ __  _ __ _____      _| | ___ _ __
| '_ \| '__/ _ \ \ /\ / / |/ _ \ '__|
| |_) | | | (_) \ V  V /| |  __/ |
| .__/|_|  \___/ \_/\_/ |_|\___|_|v5.23.0
|_| Get the most at https://cloud.prowler.com 

New! Send findings from Prowler CLI to Prowler Cloud
More details here: goto.prowler.com/import-findings

Date: 2026-04-14 14:31:50


Registry: https://registry.ops.eblu.me (36 repositories, 147 images)

  blumeops/alloy (6 tags)
    v1.14.0-613f05d, v1.14.0-613f05d-nix, v1.14.0-61f02a0, v1.14.0-61f02a0-nix, v1.14.0-fd0bebb, v1.14.0-fd0bebb-nix
  blumeops/alpine (1 tags)
    latest
  [[ ... Removed many images here for this issue ... ]]

Traceback (most recent call last):
  File "/Users/eblume/code/3rd/prowler/.venv/bin/prowler", line 10, in <module>
    sys.exit(prowler())
             ^^^^^^^^^
  File "/Users/eblume/code/3rd/prowler/prowler/__main__.py", line 294, in prowler
    global_provider.print_credentials()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'print_credentials'
---EXIT CODE: 1

How did you install Prowler?

Cloning the repository from github.com (git clone)

Environment Resource

I've reproduced this issue when run as a CronJob in my homelab minikube cluster, as a local docker container, and built from source from a github clone.

OS used

MacOS (local)
Debian Bookworm (container)

Prowler version

Prowler 5.23.0 (You are running the latest version, yay!)

Python version

Python 3.12.12

Pip version

uv 0.10.9 (f675560f3 2026-03-06)

Context

This is the same code path added in PR #10470 (fix for #10457). The --registry flag itself works correctly, but --registry-list was never tested end-to-end. The root cause is that ImageProvider.init returns early when _listing_only is set (line 167), skipping Provider.set_global_provider(self) at the bottom of the constructor. main.py:294 then calls print_credentials() on None.

I have a fix ready with a regression test. PR incoming shortly.

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