Skip to content

Add a machine-readable scenario catalog command #5

Description

@bsmensah-ctrl

Problem

The CLI exposes built-in scenarios through argparse choices, but scripts and instructors cannot discover their event/finding expectations without running each scenario separately.

Proposed change

Add a list-scenarios CLI subcommand that writes a JSON catalog to stdout.

Acceptance criteria

  • dll-injection-lab list-scenarios exits 0 and emits valid JSON.
  • Each catalog entry includes:
    • name;
    • a short defensive description;
    • event_count;
    • expected_finding_count.
  • The catalog includes every name in SCENARIOS; adding a future scenario must not require updating a second hard-coded name list.
  • Current expectations are covered by tests: classic has 5 events and 1 finding; cooperative has 3 events and 0 findings.
  • The command performs only in-memory synthetic analysis and does not read processes, the network, or platform APIs.
  • Add the command to the CLI section of README.md.
  • uv run --frozen pytest -q and uv run --frozen ruff check . pass.

Useful starting points

  • src/crossview_lab/cli.py
  • src/crossview_lab/simulator.py
  • src/crossview_lab/analyzer.py
  • tests/test_cli.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions