Skip to content

[Bug]: ScanAll always returns nil even when every scan operation fails #77

Description

Version

sbi version: main @ d9404ec
Go: 1.26.5

What happened?

Pipeline.ScanAll logs per-repository and per-image errors but always returns nil. A total outage (registry down, Docker unavailable, all images failing) still reports success, and the CLI proceeds to generate reports from a stale database.

Nightly workflow uses if: success() before commit, so a fully failed scan can still look green and republish old recommendations.

Expected:

  • Continue scanning remaining images on partial failure (current behavior).
  • Return an error when all scan attempts fail (total outage).
  • Log a clear summary when some attempts fail.

Steps to reproduce

  1. Point config at unreachable registries, or stop Docker.
  2. Run sbi scan --config-dir config --database test.db ....
  3. Observe errors in logs but process exit code 0 and report generation continuing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions