@burtson-labs/bandit-stealth-cli 1.7.501 → 1.7.502

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,6 +43,7 @@ _Prefer an IDE?_ The sibling Bandit Stealth extension for VS Code / Cursor ships
43
43
  ```bash
44
44
  bandit # interactive REPL
45
45
  bandit "explain @src/auth/login.ts" # one-shot with a file mention
46
+ bandit --read-only # start in plan mode: read and plan, change nothing
46
47
  ```
47
48
 
48
49
  The CLI installs two commands that do the same thing: `bandit` and `bandit-agent`. The Python security linter [Bandit](https://github.com/PyCQA/bandit) also installs a `bandit` command; if it comes first on your PATH (common in Python environments and on shared clusters), use `bandit-agent`. `bandit doctor` tells you when that happens.
@@ -60,7 +61,9 @@ BANDIT_ACCEPT_TERMS=1 bandit "summarize the open TODOs"
60
61
  bandit --accept-terms "summarize the open TODOs"
61
62
  ```
62
63
 
63
- The variable and the flag accept for that run only and write nothing. `--help`, `--version`, `terms`, `upgrade`, `self-update` and `doctor` never ask.
64
+ `--accept-terms` is saved in `~/.bandit/terms.json` like an answer at the prompt, so later runs need neither. `BANDIT_ACCEPT_TERMS=1` accepts for that run only and writes nothing (for CI and containers). `--help`, `--version`, `terms`, `upgrade`, `self-update` and `doctor` never ask.
65
+
66
+ An option bandit does not know (a typo such as `--read-onyl`) stops with exit status 2 and names the closest one; it is never sent to the model as a prompt. Put prompt text that starts with `-` after `--`: `bandit -- "-v means verbose?"`.
64
67
 
65
68
  ---
66
69
 
@@ -330,11 +333,13 @@ Workspace config overrides user config. Secrets belong in the user-level file, n
330
333
  | `BANDIT_NO_MODELS_DEV` | `0` | `1`/`true` to never fetch the models.dev catalogue for an OpenAI-compatible server |
331
334
  | `BANDIT_NO_BROWSER` | `0` | `1`/`true` to never launch the default browser (`insights`, share links); the path or link is still printed |
332
335
  | `BANDIT_NO_CLIPBOARD` | `0` | `1`/`true` to leave the clipboard alone when a share link is printed |
333
- | `BANDIT_ACCEPT_TERMS` | — | `1`/`true` to accept the [Terms of Use](#terms-of-use) for this run without a prompt (same as `--accept-terms`) |
336
+ | `BANDIT_ACCEPT_TERMS` | — | `1`/`true` to accept the [Terms of Use](#terms-of-use) for this run only (`--accept-terms` also saves it) |
334
337
  | `NO_COLOR` | — | Disable ANSI colors |
335
338
 
336
339
  ### Settings file — hooks, permissions, security guard
337
340
 
341
+ Plan mode is read-only: the agent reads files, searches and runs read-only commands (`git status`, `ls`, `grep`), and every edit, file write, state-changing command and network write is refused, so it ends with a plan instead of changes. Start a session in it with `bandit --read-only` (also for one-shot prompts: `bandit --read-only "how would you add caching here?"`), or switch with shift+tab or `/plan`; `BANDIT_PERMISSION_MODE=plan` does the same. `--read-only` cannot be combined with `--auto`.
342
+
338
343
  Terminal `--auto` mode runs routine work immediately and reviews other actions with the selected provider/model. The reviewer considers the raw user requests in the current session, the proposed action and bounded local metadata. Requested cleanup can proceed without a blanket deletion prompt; uncertain effects or missing authorization still ask. External, system and irreversible actions need explicit authorization. Reviews use no tools, have a 12-second deadline, and their decisions appear in the turn log and `/permissions`. Explicit policy rules and security guards remain in force. Targeted edits to existing user-owned temporary helper files can qualify as task-related scratch work when the host verifies file ownership and location; this does not authorize arbitrary temporary-file deletion or replacement. Model review is fallible; `ask` mode remains available when every ungranted action should be reviewed by you.
339
344
 
340
345
  Interactive sessions expose `monitor_job`, `check_monitor`, and `cancel_monitor`. Ask the agent to monitor a particular run and specify its cadence and authorized response, for example: “Check this run every five minutes; if it fails, collect its logs and diagnose it.” The monitor returns immediately and uses a timer to run the approved status command. A terminal result resumes the agent, including when other jobs are still running. Follow-up actions go through the normal permissions gate.