Skip to content

feat: add validate-config subcommand (closes #9) - #71

Open
qiaobochi040726-source wants to merge 1 commit into
BreachDirect:mainfrom
qiaobochi040726-source:20260815-validate-config
Open

feat: add validate-config subcommand (closes #9)#71
qiaobochi040726-source wants to merge 1 commit into
BreachDirect:mainfrom
qiaobochi040726-source:20260815-validate-config

Conversation

@qiaobochi040726-source

Copy link
Copy Markdown
Contributor

Implements #9: add a validate-config subcommand that parses and validates stellargate.yaml (reusing Config.load error handling) and prints which tools are enabled, without running any scan.

Changes

  • stellargate/cli.py: new validate-config subcommand (--config defaults to stellargate.yaml); config errors log to stderr and exit 2, success prints per-tool enabled/disabled summary and exits 0.
  • tests/test_cli.py: 3 tests — valid config returns 0 with summary output, missing config returns 2 with error on stderr, and no scan is triggered.

Verification

  • uv run --no-project --with pyyaml --with pytest --with hypothesis python -m pytest tests/ -q → 28 passed
  • python -m stellargate.cli validate-config --config stellargate.example.yaml → exit 0
  • python -m stellargate.cli validate-config --config /nonexistent.yaml → exit 2

Fixes #9

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.

Add stellargate validate-config subcommand

1 participant