Skip to content

DOC: replace nonexistent pyrit CLI command and deprecated --list-* flags with pyrit_scan subcommands - #3791

Open
nabeleon94 wants to merge 1 commit into
microsoft:mainfrom
nabeleon94:docs/fix-pyrit-cli-commands
Open

nabeleon94 wants to merge 1 commit into
microsoft:mainfrom
nabeleon94:docs/fix-pyrit-cli-commands

Conversation

@nabeleon94

Copy link
Copy Markdown

Description

Fixes #3707.

The configuration guide tells users to run pyrit list initializers, but the package only installs pyrit_backend, pyrit_scan and pyrit_shell (see [project.scripts] in pyproject.toml), so the command fails with exit code 127.

While checking the other documented CLI invocations as the issue suggests, I found a few places that still point users at the flag-style --list-* commands. Those are now a deprecated back-compat shim (_LEGACY_COMMAND_FLAGS in pyrit/cli/pyrit_scan.py, slated for removal in 1.3.0) and print a deprecation note when used:

  • doc/getting_started/pyrit_conf.md: pyrit list initializers becomes pyrit_scan list-initializers (or list-initializers inside pyrit_shell).
  • doc/scanner/1_pyrit_scan.py / .ipynb: the prose around the initializers cell and the techniques note now say list-initializers / list-scenarios instead of --list-initializers / --list-scenarios (the code cell already used pyrit_scan list-initializers). Both paired files have the same edit; no outputs changed.
  • pyrit/cli/_cli_args.py: the --techniques and --target help text said "Use --list-converters/--list-targets"; it now says "Use the list-converters/list-targets command", which reads correctly for both pyrit_scan and pyrit_shell.

No other pyrit <verb> invocations turned up in doc/ or README.md.

Tests and Documentation

  • pyrit list initializers in the project venv: exit 127 (no such executable). pyrit_scan list-initializers --help parses fine; pyrit_scan --list-initializers prints the deprecation note.
  • pyrit_scan run --help shows the updated --target / --techniques help text.
  • tests/unit/cli: 668 passed, 1 skipped.
  • ruff check and ruff format --check clean on the touched Python files; the .ipynb still loads as valid JSON.

This branch has not been deployed

No deployments
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.

Configuration documentation recommends a CLI executable that is not installed

2 participants