Skip to content

Phase 1: terminal output overhaul - result summary, severity table, --quiet/--no-color#118

Merged
advaitpatel merged 1 commit into
mainfrom
feat/terminal-output-overhaul
Jul 1, 2026
Merged

Phase 1: terminal output overhaul - result summary, severity table, --quiet/--no-color#118
advaitpatel merged 1 commit into
mainfrom
feat/terminal-output-overhaul

Conversation

@advaitpatel

Copy link
Copy Markdown
Collaborator

Summary

Reworks DockSec's terminal output into a clean, consistent result summary and fixes the
long-standing progress-bar and exit-code issues. Scanning logic is unchanged.

Changes

New output layer (docksec/output.py)

A single module owns the look of everything printed to the terminal: one shared Rich
console, section/status helpers, a box-drawing severity table, the score line, a
"Quick take" action block, the report list, and a suggested next command. No emoji;
structure comes from color and box-drawing borders only.

Result summary

Every scan now ends with: a severity table (Critical/High/Medium/Low), the security
score with a color-coded rating, a Quick take highlighting the most important findings,
the generated reports, and a suggested next command.

Fixed

  • Report progress no longer prints each step twice / out of order (reports generate
    silently; the CLI renders one report line from the returned paths).
  • A failed scan (e.g. image not found) now exits non-zero instead of ending with a
    misleading "Analysis complete!".

Added

  • --quiet - reduce output to warnings, errors, and the result summary.
  • --no-color - disable colored output (also honors the NO_COLOR env var).

Testing

  • ruff check . passes.
  • pytest: 102 passed (new test_output.py; updated scanner/CLI tests).
  • Manual runs verified for scan-only, --quiet, --no-color (0 ANSI escapes), and
    --compose.

Notes

  • Scope is deliberately contained to CLI + summary/report output. A few verbose
    error-path troubleshooting prints in docker_scanner still use print(); routing
    those is a low-priority follow-up.
  • Format selection and --severity/--fail-on/--json-to-stdout remain Phase 2.

@advaitpatel
advaitpatel merged commit de2387b into main Jul 1, 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