Skip to content

Route docker_scanner error/troubleshooting output through docksec.output#125

Merged
advaitpatel merged 1 commit into
mainfrom
chore/route-scanner-prints-through-output
Jul 2, 2026
Merged

Route docker_scanner error/troubleshooting output through docksec.output#125
advaitpatel merged 1 commit into
mainfrom
chore/route-scanner-prints-through-output

Conversation

@advaitpatel

Copy link
Copy Markdown
Collaborator

Summary

Follow-up cleanup: docker_scanner.py's Hadolint/Trivy/Docker Scout error and
troubleshooting messages used raw print() instead of the docksec.output layer used
everywhere else in the tool, so they didn't honor --quiet/--no-color/--json.

Changes

  • Hadolint execution/timeout/not-found/unexpected-error paths: print() -> ui.error() +
    ui.detail() for troubleshooting steps.
  • Trivy JSON scan failures (stderr, timeout, JSON decode, generic exception) and the
    legacy text-scan timeout/error paths: print() -> ui.error().
  • Docker Scout advanced_scan() summary: print() -> ui.info()/ui.detail().
  • Left the standalone main()/main block (python docker_scanner.py , a separate
    debug entry point) untouched - it's not part of the real docksec CLI and was out of
    scope for this cleanup.

Testing

  • ruff check . passes.
  • pytest: 157 passed (no behavior change, no new tests needed - purely an output-routing
    change).
  • Manual runs verified error and normal output still render correctly for --image-only
    and --compose scans.

@advaitpatel
advaitpatel merged commit 60e3b27 into main Jul 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant