Skip to content

feat: implement CLI with rich output and configuration #10

@leoneperdigao

Description

@leoneperdigao

Description

Implement the full command-line interface for Quantum-Safe Guardian with rich terminal output, configuration file support, baseline management, and multiple output modes. The CLI is the primary user interface for running scans locally and in CI/CD pipelines.

Tasks

  • Implement CLI commands:
    • scan: Run one or more scanners against target paths/URLs
    • report: Generate reports from saved scan results
    • init: Create a default .quantum-safe.yml configuration file
    • version: Show version and build information
    • baseline: Manage baseline files (create, update, diff)
  • Add rich terminal output:
    • Color-coded severity indicators (red=critical, yellow=warning, blue=info)
    • Formatted finding details with file path, line number, and code context
    • Summary table at end of scan
    • Use rich library for terminal formatting
  • Implement configuration file support:
    • YAML format (.quantum-safe.yml or .quantum-safe.toml)
    • Scanner selection and configuration
    • File include/exclude patterns
    • Severity thresholds
    • Output format selection
    • Custom algorithm severity overrides
  • Implement baseline file functionality:
    • Suppress known findings by hash
    • --update-baseline flag to add current findings
    • Show new findings vs. baseline in output
    • Support baseline expiration dates
  • Add output modes:
    • --quiet: Only output summary line (for CI)
    • --verbose: Include debug information and scan details
    • --format: Select output format (table, json, sarif, csv)
    • --output: Write results to file
  • Implement progress bar for large scans (using rich.progress)
  • Write CLI tests using click.testing.CliRunner or typer.testing.CliRunner

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCommand-line interfaceenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions