@stroq/cli 0.18.0 → 0.19.1

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
@@ -9,7 +9,18 @@
9
9
  <a href="https://github.com/AGGIB/Stroq/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="License: Apache 2.0"></a>
10
10
  </p>
11
11
 
12
- **Local action firewall for AI coding agents.** Stroq scans what your agent reads (files, web pages, MCP tool results, command output) for indirect prompt injection, taints the session when it finds instruction-like text, and deterministically blocks the dangerous follow-up actions an injected agent would take — outbound network commands, secret access, external git pushes, encoded execution, self-tampering. Everything runs locally; nothing is sent to a cloud.
12
+ # Stroq — find known secrets in AI coding-agent sessions
13
+
14
+ **Check a session you already ran:** `stroq sent` looks for exact matches to credentials currently available on your machine in local Claude Code, Codex CLI and Cursor session records. It reports the credential name, source file and recorded tool call without printing the value. A match proves that the value appears in a local record; it does not prove that a model provider received it, that the credential is still valid or that a breach occurred.
15
+
16
+ ```bash
17
+ npx @stroq/cli sent --last # inspect the newest supported session in this project
18
+ npx @stroq/cli replay --last # trace recorded content to later agent actions
19
+ ```
20
+
21
+ Run these commands from the project directory with Node.js 22 or newer. They work on sessions from before Stroq was installed. `npx` downloads the CLI from npm; `sent` reads local credential sources to know what values to match and does not upload them. See the [guide's coverage and limits](https://github.com/AGGIB/Stroq/blob/main/docs/GUIDE.md).
22
+
23
+ **Guard future sessions:** Stroq scans content visible to installed agent hooks, carries suspicion and source information into later decisions, and applies a local policy to the tool calls those hooks expose. It supports native hooks, an OpenClaw plugin and a stdio MCP proxy; coverage differs by agent and channel. The hooks do not send telemetry.
13
24
 
14
25
  Supported today: **Claude Code**, **Cursor**, **Codex**, **Copilot CLI**, **Windsurf**, **Google Antigravity** (native hooks) · **OpenClaw** (in-process plugin) · **any MCP client** (stdio proxy).
15
26
 
@@ -22,6 +33,7 @@ npx @stroq/cli init --agent codex # Codex CLI: writes .codex/hooks.json
22
33
  npx @stroq/cli init --agent copilot # Copilot CLI: writes .github/hooks/stroq.json
23
34
  npx @stroq/cli init --agent openclaw # OpenClaw: installs a plugin into ~/.stroq/openclaw-plugin
24
35
  npx @stroq/cli init --agent windsurf # Windsurf: merges into .windsurf/hooks.json
36
+ npx @stroq/cli init --agent antigravity # Google Antigravity: merges into .agents/hooks.json
25
37
  npx @stroq/cli init --agent mcp --client claude-desktop # any MCP client: wraps its stdio servers
26
38
  npx @stroq/cli doctor # check the installation
27
39
  ```
@@ -36,21 +48,23 @@ MCP proxy note: for clients with no hook API, `--agent mcp` rewrites the client'
36
48
 
37
49
  ## Commands
38
50
 
39
- | Command | What it does |
40
- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
- | `stroq init [--agent <name>] [--user] [--dry-run]` | Install hooks for `claude-code`, `cursor`, `codex`, `copilot`, `openclaw` or `windsurf`, or wrap an MCP client's stdio servers with `--agent mcp --client <name>` or `--config <path>` (`--user` for the home-directory copy) |
42
- | `stroq hook <agent>` | Hook entrypoint (reads the event on stdin; `copilot` and `openclaw` take a `pre`/`post` argument, the others do not) |
43
- | `stroq mcp --server <name> -- <cmd>` | MCP stdio proxy: judges every `tools/call` and scans every result for one wrapped server |
44
- | `stroq doctor` | Check Node version, rules, hooks for every agent, self-test |
45
- | `stroq log [--count 20]` | Show recent audit entries |
46
- | `stroq verify` | Verify the audit hash chain |
47
- | `stroq untaint [--session <id>] [--all]` | Clear a false-positive session's taint and provenance, or every session's |
48
- | `stroq why [--seq <n>]` | Explain the most recent denied/asked action: rule, provenance, taint |
49
- | `stroq canary [--name <NAME>]` | Print a canary secret to plant; its outbound use is denied and taints the session |
50
- | `stroq attack [--json] [--only <id>] [--fuzz]` | Replay 20 recorded incidents against your policy; `--fuzz` crosses every scenario with a deterministic mutation set and reports the variants that still reach `allow`; exit 1 if any gets through |
51
- | `stroq exposure [--probe] [--share] [--json]` | Map this machine's agent surface and report what reaches you; exit 1 on any finding |
52
- | `stroq bench [--corpus <dir>] [--json] [--verbose]` | Measure the shipped rule set's false-positive rate against a corpus of benign developer documentation; `--verbose` lists the flagged files |
53
- | `stroq coverage [--format <table\|navigator>] [--json]` | Print the control mapping against MITRE ATLAS and OWASP ASI, built from the attack corpus's own scenario tags; `--format=navigator` emits an ATT&CK Navigator layer |
51
+ | Command | What it does |
52
+ | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
53
+ | `stroq init [--agent <name>] [--user] [--dry-run]` | Install hooks for `claude-code`, `cursor`, `codex`, `copilot`, `openclaw`, `windsurf` or `antigravity`, or wrap an MCP client's stdio servers with `--agent mcp --client <name>` or `--config <path>` (`--user` for the home-directory copy) |
54
+ | `stroq hook <agent>` | Hook entrypoint (reads the event on stdin; `copilot` and `openclaw` take a `pre`/`post` argument, the others do not) |
55
+ | `stroq mcp --server <name> -- <cmd>` | MCP stdio proxy: judges every `tools/call` and scans every result for one wrapped server |
56
+ | `stroq doctor` | Check Node version, rules, hooks for every agent, self-test |
57
+ | `stroq log [--count 20] [--json]` | Show recent audit entries; `--json` prints one entry per line |
58
+ | `stroq verify` | Verify the audit hash chain |
59
+ | `stroq untaint [--session <id>] [--all]` | Clear a false-positive session's taint and provenance, or every session's |
60
+ | `stroq why [--seq <n>]` | Explain the most recent denied/asked action: rule, provenance, taint |
61
+ | `stroq sent [--last] [--transcript <path>] [--json]` | Match known local credentials against a recorded session, including tool results where a transcript is available; report names and sources, never values |
62
+ | `stroq replay [--last] [--transcript <path>] [--json]` | Reconstruct which recorded content preceded later agent actions and show the matching evidence |
63
+ | `stroq canary [--name <NAME>] [--file <path>]` | Print a canary secret to plant; its outbound use is denied and taints the session. `--file` plants it as a decoy file: any call naming the file is denied and taints the session |
64
+ | `stroq attack [--json] [--only <id>] [--fuzz]` | Replay 21 documented-incident and synthetic scenarios against your policy; `--fuzz` crosses each with a deterministic mutation set and reports variants that reach `allow`; exit 1 if any gets through |
65
+ | `stroq exposure [--probe] [--share] [--json]` | Map this machine's agent surface and report what reaches you; exit 1 on any finding |
66
+ | `stroq bench [--corpus <dir>] [--json] [--verbose]` | Measure the shipped rule set's false-positive rate against a corpus of benign developer documentation; `--verbose` lists the flagged files |
67
+ | `stroq coverage [--format <table\|navigator>] [--json]` | Print the control mapping against MITRE ATLAS and OWASP ASI, built from the attack corpus's own scenario tags; `--format=navigator` emits an ATT&CK Navigator layer |
54
68
 
55
69
  `stroq exposure` reads files only. `--probe` is the one flag that starts a process: it launches each configured stdio MCP server, asks once for `tools/list`, scans the tool descriptions and shuts the server down — no tool is ever called. Without it, tool-description poisoning is not covered by the run, and the report says so. `--share` prints a redacted summary built from a whitelist, locally; nothing is transmitted.
56
70
 
package/dist/corpus.json CHANGED
@@ -557,7 +557,7 @@
557
557
  ]
558
558
  }
559
559
  },
560
- "expect": "suspect"
560
+ "expect": "clean"
561
561
  },
562
562
  {
563
563
  "event": {
@@ -760,7 +760,7 @@
760
760
  }
761
761
  }
762
762
  },
763
- "expect": "suspect"
763
+ "expect": "clean"
764
764
  },
765
765
  {
766
766
  "event": {