You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The frontend refactor regressed scenario-declared parameter handling on
both CLI entry points - flags like `--max-turns 7` were rejected before
the second pass could fetch metadata from the server.
pyrit_scan
- `parse_args` now uses `parse_known_args` (pass 1 is tolerant of
scenario-specific flags) and stashes leftovers + the raw arg list on
the Namespace for the second pass.
- `_reparse_with_scenario_params` threads the original `args` list
instead of reading `sys.argv[1:]`, so explicit-args callers work.
- `main` does a strict re-parse when there are unknown args but no
scenario is specified, preserving the original `exit 2` error for
truly invalid flags.
pyrit_shell
- `do_run` now fetches `get_scenario_async` first, builds
`Parameter` objects from the response's `supported_parameters`,
and threads `declared_params` into `parse_run_arguments`.
- Calls `extract_scenario_args` and propagates `scenario_params`
on the REST request payload.
Tests
- New `TestScenarioParamFlow` (4 tests) and `TestShellScenarioParamFlow`
(4 tests) regression cases covering forward, invalid-flag, no-params,
and metadata-fetch failure paths.
Diff coverage remains at 96%.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments