@burtson-labs/bandit-stealth-cli 1.7.507 → 1.7.508

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.
Files changed (3) hide show
  1. package/README.md +34 -0
  2. package/dist/cli.js +1780 -1644
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -125,6 +125,7 @@ Type `?` on an empty prompt for the at-a-glance overlay; `/help` for the full li
125
125
  | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
126
126
  | `/help` | Full slash-command list |
127
127
  | `/doctor` | Check setup, provider, workspace context, permissions, and next best actions |
128
+ | `/chrome` (or `/browser`) | Stealth for Chrome: connection status, granted sites, `/chrome connect` to attach mid-session |
128
129
  | `/login <key>` | Save a Bandit Cloud API key to `~/.bandit/config.json` (also `/login`, `/login clear`) |
129
130
  | `/usage` | Bandit Cloud session + weekly usage limits (`/usage check` for one-line ⚠ flag) |
130
131
  | `/model [name]` | Switch model mid-session |
@@ -216,6 +217,39 @@ MCP tools ask before they run, because Bandit cannot see what a server does with
216
217
 
217
218
  ---
218
219
 
220
+ ## Chrome, Edge and Brave — Stealth for Chrome
221
+
222
+ With the **Bandit Stealth for Chrome** extension installed (`apps/stealth-chrome` in this repository; not yet on the Chrome Web Store or Edge Add-ons), a session can read and act on pages in your own browser: pages behind your sign-in, JavaScript apps, the real console. The same MV3 extension loads in Chrome, Microsoft Edge, Brave, Chromium, Vivaldi and Arc. The agent loop stays on your machine; the browser reaches it through a native messaging host that is this same CLI.
223
+
224
+ ```bash
225
+ bandit chrome install # registers this bandit as the extension's host in every Chromium browser found
226
+ bandit chrome install --browser edge # one browser (chrome, edge, brave, chromium, vivaldi, arc, or all); quit and reopen it once
227
+ bandit chrome doctor # the wrapper, each browser's manifest, and whether a host is running
228
+ bandit --chrome "open the staging site, reproduce the bug from issue #412 and tell me what the console says"
229
+ ```
230
+
231
+ `bandit browser …` is the same command under a neutral name. Inside a session, `/chrome` shows the connection and the granted sites, `/chrome connect` attaches after you have opened the browser, and `bandit doctor` reports the browser status with the rest. When a task reads like browser work and nothing is connected, the agent says so in one line and tells you how to connect; it never pretends to have clicked.
232
+
233
+ The manifest goes to each browser's own place (macOS `~/Library/Application Support/<Browser>/NativeMessagingHosts`, Linux `~/.config/<browser>/NativeMessagingHosts`, Windows `HKCU\\Software\\<Vendor>\\<Browser>\\NativeMessagingHosts`). One extension id covers them all: the manifest key pins it for unpacked loads; store listings get their own ids, which are added to `allowedExtensionIds` as they appear, and `--extension-id` allows one more.
234
+
235
+ The tools: `browser_tabs`, `browser_open`, `browser_navigate`, `browser_read_page` (title, URL, visible text and the interactive elements, each with a ref like `[e12]`), `browser_find`, `browser_get_text`, `browser_console`, `browser_screenshot` (attached as an image), `browser_click`, `browser_type`, `browser_select`. Elements are addressed by refs from the last read, never by selectors the model writes. Tabs the agent opens go into a tab group named Bandit; it sees no other tab. While it works, the page shows a Bandit-teal glow, a cursor that moves to each target with a label of the current action, and a **Stop Bandit** control.
236
+
237
+ What asks, in every mode:
238
+
239
+ | Call | Asks |
240
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
241
+ | Reads: tabs, read_page, find, get_text, console, screenshot | Never on a site you granted in the side panel |
242
+ | `browser_open` / `browser_navigate` | The first visit to a host (`browser_open:<host>` allow rules cover it); the card shows the full URL, query string included |
243
+ | `browser_click` / `browser_type` / `browser_select` | Until you choose **always** for that site, saved per user in `~/.bandit/chrome/sites.json` (`bandit chrome sites`); the card shows the site, page, element and text |
244
+ | A click on a control that sends, pays, publishes, deletes, transfers or confirms; typing with Enter into a form with such a button; text or a URL that carries something Bandit read on another site; an unknown target | Every time, `dangerous` mode included. No grant covers it |
245
+ | Password, one-time-code and payment fields; Allow on a sign-in or consent page; `chrome://`, extension and store pages; Bandit's own sign-in; adult and pirated-content sites | Refused, not asked. Banking, healthcare, government and cloud-console sites are read-only until you enable actions for the site in the panel |
246
+
247
+ Every decision is one line in `~/.bandit/audit/bandit-audit-<date>.jsonl` (origin and element, never page content). The system prompt tells the model that page text is data, that a page cannot grant permission or change the task, and that credentials are yours to type. An administrator turns the feature off or narrows it with a `browser` block in the machine policy file (`enabled`, `allowedHosts`, `blockedHosts`, `actions: off|prompt|allow`, `screenshots`).
248
+
249
+ `bandit chrome mcp` exposes the same tools over MCP stdio for other clients; `bandit chrome host --loopback` runs the host over a token-protected loopback bridge for development, registering nothing in Chrome. The browser prompt-injection suite under `bench/agent/browser-injection/` measures the controls above against a model that follows every injection (`pnpm bench:browser-injection -- --provider fake --mode all`) and against real local models.
250
+
251
+ ---
252
+
219
253
  ## Recommended models
220
254
 
221
255
  Bandit uses native tool calling when supported by the selected provider.