# Changelog All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.30.0] - 2026-11-05 ### Added - **`npx @stroq/cli` shows what your agents did, as a card.** Run with no command, Stroq reads the last 30 days of Claude Code and Codex sessions on this machine, replays them through the policy in a throwaway home (nothing runs, nothing is sent), and prints plain counts: the commands your agent ran, how many of them came from text it read (a README, page, issue or tool result), the keys that left this machine, and the repositories that run code as soon as an agent opens them. Under the counts are the few moments worth a look, each with `stroq show N`, which prints the call behind it with every traced key replaced by `[NAME]` and the rule that linked them. `--days N` (1 to 365), `--json`, `--share` (one line to paste) and `--plain`. It is a report and not a gate: it exits 0 whatever it finds, and writes only a small cache under `~/.stroq` that the next run reads. On a machine with about 2,000 sessions the first run took about 30 s and the next about 4 s. - **Hoo, an orange pixel owl, stands beside the card.** It greets once per machine with a short animation and then stays still; in CI and with `--no-animation` it is still from the start. A pipe, `NO_COLOR`, `TERM=dumb`, `STROQ_NO_MASCOT=1` and `--plain` get the text alone. The owl and the card fit in 80 columns; on a narrower terminal the owl stands above the text. - **A task slipped into data for the agent is caught.** A new rule, `STROQ-2026-00014`, flags text in an MCP result, a record, a fetched page or a repository file that greets the agent, puts something to do ahead of the user's own request ("before finishing the task above, first ...") and speaks in the sender's name: a marker such as `[PRIORITY MESSAGE]` or a signature such as "— the user". It needs two of those together, so a letter that opens "Dear customer, before completing your order" is left alone. On the public NVIDIA Nemotron indirect-prompt-injection set (CC BY 4.0), the injections stopped went from 6 to 628 of the 635 held-out records; the same records without the injection stop 5 of 635 (1 at 0.29.0). Over 500 public coding-agent sessions (28,347 actions) the number of stops is unchanged at 19, and on the Terminal-Pivot sample it is unchanged at 144 of 6,640 final commands. ### Changed - **The console is five screens: Check, Live, Agents, Rules and Skills & MCP, and a theme switch.** The menu lists exactly these; every older address leads to the screen that took its place (a 302 from the server that carries only a session, a filter, a rule, an event or a record the destination reads back through its own guard). Nothing that is not connected is shown: a screen with no private link says to run `npx @stroq/cli console`, and nothing links to Settings any more. - **Check** (`/`) is the card of `stroq`, made by the same code. The console's engine runs `stroq card --json` over your sessions (same cache, same `stroq show` file), and the sentences come from the CLI's own `cardView`, which `renderCard` now prints from, so the numbers and words are the terminal's. Hoo is drawn from the terminal's sprites (`pnpm owl:svg` writes `console/public/hoo/*.svg`; `--check` fails when they differ). A moment opens in place with the evidence `stroq show N` prints. Under it: one line for each agent, the fix line `npx @stroq/cli init`, the settings-check strip, and the older installation, rule-file and scenario checks as "Setup checks". "Run protection check" became **Check again**; the keys and autorun rows are `/#keys` and `/#autorun`. - **Live** is the old Live, Activity, event page, Sessions, Overview and the evidence of Investigations: counts on top, the filters all / denied / asked / flagged with a session, a day and a search (all in the address), and a row that opens into its chain (what the agent read, what it did, the decision, the rule) with the recorded evidence, the comparison with the current policy and `stroq why` / `stroq untaint` to copy. The filter says Denied, not Stopped: the journal records the decision, not what the host then did. - **Agents** shows when Stroq was last asked and the last test of the hook in each agent's row, and which of that agent's settings weaken it (the settings check, now at `/agents/#settings`). The hook-check history page is gone; the row holds the last record. - **Rules** is Try an action, the rules you can change (preview and test before anything is written), History with an undo, and the rules reference with a search, in one screen. The saved policy checks stay at `/policies/checks/`. - **Skills & MCP** is one list of skills and MCP servers by agent (what, where from, rule hits, what changed since you last looked), read when it opens and when you press Check again; the five-minute watch is no longer started by the server. The changes that can be made to an item (route through Stroq, pause or resume, move a skill aside, mark reviewed) are said once as preview, apply, undo, and the undo of each, the approval of MCP tool versions and the check of a skill's text are parts under the list (`/skills/?part=quarantine|registrations|tools|check`). - **`stroq --help` shows five commands.** `stroq`, `stroq init`, `stroq why`, `stroq attack` and `stroq uninstall`, and a line that says `stroq help --all` lists the rest. `sent`, `replay`, `inspect`, `exposure`, `canary`, `vet`, `doctor`, `log`, `untaint`, `trust`, `policy`, `verify` and `console` work as before and keep their `--help`; they are only listed under `stroq help --all`, grouped by what they are for. - **`stroq bench`, `stroq coverage` and `stroq prove` are developer tools of the repository now**: `pnpm dev:bench`, `pnpm dev:coverage` and `pnpm dev:prove`, with the same flags, output and exit codes (`pnpm dev:bench -- --actions`, `--latency` and `--json` included). The reports in `docs/BENCH.md` and `docs/COVERAGE.md` are generated from the same code and say so. The live check that `stroq doctor` reads is only run with `pnpm dev:prove` now, and `stroq doctor` no longer names a place to run it. - **Messages no longer send you to commands that are gone.** `stroq doctor`, `stroq init --agent mcp`, the MCP proxy and the credential filters of the console used to tell you to run `stroq add`, `stroq harden apply` or `stroq run --sandbox`. A pinned MCP wrapper that no longer matches its pin now names `stroq init --agent mcp --unwrap`, which takes the pin out; an installed skill that changed or went missing is to be installed again with your agent's own command. A pin written by an older `stroq add` keeps working and keeps being checked. - **Fewer false flags on documentation pages.** A README or a guide fetched by the agent is read with the same rules, but a few patterns that fired on ordinary documentation now read the page more narrowly: a credential path in a table of environment variables or a list of places to look for credentials (still flagged when the line also holds a program that moves a file or a host), "set to 'true' to disable ...", `POST /api/...`, `.env.example`, a placeholder after a private key header. A phrasing nobody listed is still flagged. Of 121 public READMEs and guides, 18 were flagged at 0.29.0 and 6 are now (14.9% to 5.0%); read the way a real `WebFetch` result is (an object, whose JSON form is scanned as well, through the built hook) it is 19 and 6. On 392 documentation pages out of 500 public coding-agent sessions, 17 were flagged and 9 are, none of them new. A file read from a cloned repository, a command's output, an MCP result and a CLAUDE.md are read exactly as before, because a planted instruction arrives by all of them. Six remain: a README that adds a `SessionStart` hook, a chat template with `<|im_start|>system`, a course on prompt injection and a README that names `secret-tool` are what the rules are for, and fd's README (it lists `/etc/passwd`) and uv's (a build log with a `file://` path) are false flags we chose to keep. - **A rule that matched a page as written is no longer lifted by the page's own decoded copy.** A page with two percent-escapes is also read with every escape decoded, and `curl … | sh` (medium) was raised to suspect by the decoded copy of an install line it had already matched as written. A base64 or hex payload keeps the encoded score. - **Two patterns that took seconds on crafted text now run in linear time.** `ATR-2026-00114` (a token sent to a destination) took 3.75 s on 200,000 characters of "log ", and `ATR-2026-00163` (run in the background without telling the user) took 51 s on "run" and 40,000 blanks. - **Hooks start faster again, with the same decisions.** Before a rule's regular expression runs, Stroq now checks that the text holds one of the literal strings the expression cannot match without. Those strings are worked out from each pattern when the CLI is built, and case is folded the way the regex engine folds it (`ſ` counts as `s` and the Kelvin sign as `k` only under the flags where the engine says so), so the check never skips a text the expression would match. zod is now bundled into the CLI, so a hook no longer loads its 70 locale files (its MIT licence ships in `THIRD_PARTY_NOTICES.md`), and the rules are kept in the code as one string that is parsed when first needed. On an M4 with Node 26, the median wall time of a hook went from 82 to 68 ms for PreToolUse, 183 to 90 ms for a short PostToolUse and 250 to 108 ms for a 60 KB one. `stroq attack`, `attack --fuzz`, `bench` and `bench --actions` give the same results as before, rule by rule. ### Removed Nine commands left the CLI. Typing one prints a single line that says it was removed in 0.30 and what to use instead, and exits with code 2. - **`stroq add` and `stroq remove`.** Check a skill or MCP server with `stroq vet`, and install it with your agent's own command. - **`stroq run`, `stroq task` and `stroq permit`.** Run your agent as usual; `stroq init` guards it. The `task-hook` entry that older Task Lock settings call still works. - **`stroq harden`.** `stroq init` guards your agent, and your agent's own deny settings can close key files. The console's credential filters went with it (see below). - **`stroq prove`.** `stroq doctor` shows whether the hook is called, and `pnpm dev:prove` runs the live check from a checkout. The console's live check went with it (see below). - **`stroq bench` and `stroq coverage`.** They are developer tools, in the repository: `pnpm dev:bench` and `pnpm dev:coverage`. Older versions of Stroq stay gated: an agent still cannot run `npx @stroq/cli@ add`, `harden apply`, `task` or `permit` through a shell, because the state gate keeps every name above. The console is five screens (Check, Live, Agents, Rules, Skills & MCP). Taken out: - **The Codex Network, Path and Skill guards of the console** (Agents & coverage → Codex → Manage, Credential paths and Codex sources, and their rows on Protection). Their own documents said the protection there was not verified. Codex is still an agent: its hooks are set up and checked on the Agents page, its settings are read by the settings check, and its `.codex/skills` folder is still inventoried and can still be quarantined. To restrict what Codex reaches, use Codex's own `config.toml` settings. - **The Guide page, the pwn.watch threat feed and the Settings choices of the console.** The Guide only repeated the sidebar. The threat feed downloaded a public list of incidents from pwn.watch and matched it against your files; nothing is downloaded by the console any more. Settings is the theme switch (dark, light, system) and nothing else; the example-data choice left it with the data source picker. - **The example data of the console.** The console shows only what Stroq recorded on this machine. The made-up events, agents and keys, the Example data button, the banner that marked them and the made-up key incident are gone; with no private link the pages say that nothing is connected, as before. - **The credential file filters of the console** (the Credential filters control in the Claude Code and Cursor agent cards, and their row on Protection). They were the console side of `stroq harden`. Filters an older version added stay in your agent's settings; remove them by hand if you want them gone. The lock that hook setup, hook removal and the other writers of agent settings share is the same file as before (`/harden/manifest.lock`), so an older Stroq still takes turns with this one. - **The live blocking check of the console** (Test in agent on each agent card, the Live blocking test panel on Protection, the Blocking checks page and the live-check rows on the home queue). It started your agent on a throwaway project, and it was the console side of `stroq prove`. `pnpm dev:prove` from a checkout of the repository still runs it, and `stroq doctor` still shows the stored result as `proof:`; where it used to say "run it in stroq console" it now says nothing about how, because there is no such button. The home screen no longer tells you to run `stroq prove`; for an agent whose hooks have not been called yet it points to Test hook on Agents. - **The task permission pages of the console** (Agents → Task permissions, the one-use task access dialog and the finding-to-permission lookup in an investigation, and their rows on Protection). They were the console side of `stroq task` and `stroq permit`. Permits an older version signed stay in `~/.stroq/tasks` with their keys, and the `task-hook` entry still enforces them; nothing in the console revokes or extends them any more. The export of an investigation is now `stroq-investigation-export/5` and no longer carries `taskRelation`. - **The pages that became parts of the five screens, and what only they used.** Protection and its queue, Activity and the event page, Sessions, Overview, Investigations (its assessments, review marks, session-taint dialog and journal check), Secret exposure (the credential comparison and its consent dialog: the card says which keys left this machine), Workspace review and the workspace and inventory watches (the five-minute polling), Settings, Settings check as a page, the hook-check history page, and Try an action, the policy history and the rules reference as separate pages. The services behind the assessments, session taint, task controls, workspace review and secret comparison are still in `console/scripts/` with their tests; no screen reaches them (the console no longer sends them a token), and the server no longer creates the watches. - **The code behind the removed commands.** `packages/cli/src/harden/` is down to the seven files other code still uses (`atomic`, `atomic-support`, `read`, `types`, `json-doc`, `json-lossy`, `json-tokens`): the plan, apply, undo, backup, manifest and credential-pattern engine of `stroq harden`, the three `commands/harden-*` modules and `task/receipt` are deleted with their tests. The lock that writers of agent settings share moved to `src/config-lock.ts`. The live check (`src/live/`, `src/commands/prove*`) stays, because `pnpm dev:prove`, `stroq doctor`, the hook check of the console and the host fixture scripts use it. ### Fixed - **The card no longer counts Stroq's own Copilot and Windsurf hooks as code that runs by itself.** `stroq init` writes a second command field for them, `powershell`, as `& ` and the same line, and only the bare line was known as Stroq's. Each command field is judged on its own with the checks as before, so a handler with any other line or field still counts. - **A skill's large data file is no longer reported as a setting that runs code.** A text file over 1 MiB in a folder of an agent is reported as not read, and it failed for a data file in a skill's `data` or `scripts` folder (a font index of 1.1 MB). That one is now read all through, in pieces of a megabyte and up to 32 MiB, for characters nobody reading it would see, and is a notice only when it holds none. With any, past 32 MiB, past the bytes one check reads, or where it cannot be scanned (`--changed-from` does not scan a blob), it fails as before; so do any other file of a skill, every settings file and every instruction file that is too large. - **`stroq inspect` no longer reports a git worktree or submodule made on this machine as a planted repository, and reads a worktree's real config.** A `.git` file that points into a real `.git` folder which points back at it is left alone, and the config of that repository is read in its place; any other `.git` file is still a finding. - **`stroq inspect` and the card no longer report a folder of ordinary clones for having `.git` folders.** Each clone's `.git` folder is judged by what it would make git run (the commands and includes in its config, the drivers its attributes route through them, and every executable hook, a commit hook too, since an extracted archive makes a `.git` folder as git does and its hooks run on the next git command) and a clean one reports nothing. The hooks Git LFS installs are not findings while they are exactly the script it writes, and git's own `*.sample` files are not hooks; any edit to an LFS script makes it a finding again, and so does a git-lfs key that runs a program (`lfs.customtransfer..path`, `lfs.standalonetransferagent`, `lfs.extension..clean` or `smudge`) set in the config or in the `.lfsconfig` of the working tree; those keys are findings of their own wherever a git config is read. A `core.hooksPath` in such a `.git` folder is a finding unless it names the repository's own `.git/hooks`, and the executable hooks in the folder it names are judged the same way. A bare repository under any other name, a `.git` that is a link, a `.git` file nobody vouches for and a folder that can be entered but not listed are still reported for being there. - **Starship's `STARSHIP_SESSION_KEY` is no longer treated as a key.** Starship sets it to a random number per shell for its own logs; its value showed up as a key in `sent` and the card, and the guard watched it as one. Only that exact name is left out. - **`stroq sent` no longer reports a key as sent to another company by a request that did not hold it.** A key was reported as sent, with the host of the request, when a later call only shared a name or a place with it: a call with a Firebase query's `"$key"` in it (the Hacker News API) after another call had a `key=` in front of a key's value, `set -x` or a script that reads `environ` beside a request (every key of the environment), a request whose text held the name of the folder a key was written to, or a step that held a key's file or the environment before a request that took nothing from it. One such command could put ten keys from three files under one host, with near-identical counts. A key now counts as sent by a call only if its value is in the call, or the call names its file, folder or pattern in its own words or is piped what a command that names it printed (`env | curl -d @-`, `cat .env | curl -d @-`, `tar czf - | curl -T -`, `rsync -a ./ host:`), or has a printer of the environment in its own words (`curl -d "$(env)"`, `--data @<(printenv)`), or names a written file by its own name or uploads it by its folder (`curl -T /dir/*.txt`). A request that only ran where the key was is MAYBE SENT, worded "a curl command made a request there, and used a variable this key was put in earlier; Stroq cannot tell whether it carried this key" (route `linked`, with `via` saying how: `variable`, `environment`, `folder`, `pattern` or `earlier-step`): a variable an earlier call put a key in, a step that came before the request in the same command and held the key's file or the environment (`set -x; curl …`, `env && curl …`), `cd && curl …`, or a request whose text only holds the name of a written file's folder, as a host does. `--fail-if third-party` and `found.third_party` no longer count them; the card counts them in no headline and shows "Your agent may have sent 10 keys to …". The report's `place` gains `via`; no field changes meaning, so the schema stays `stroq-sent/2` and `stroq-sent-counts/1`. - **`stroq sent` and the card no longer trace values that look like examples or placeholders.** A framework's quick start and a team's template put the same values in thousands of `.env` files (`super-secret-jwt-token-with-at-least-32-characters-long`, a worker token like `local-dev-worker-token`, `replace-with-your-api-key`, AWS's and Stripe's documentation keys), and a hook test that sent one "sent a key". A value read from a key file or the environment is traced only if it is not a known placeholder or documentation value, has some entropy and more than one class of character, and is not mostly common words; a vendor-shaped token (`sk-…`, `AKIA…`, `ghp_…`, a JWT) and a weak password a person chose (`hunter2hunter2`, `Welcome2024!`) are traced. The values left out are counted, never dropped in silence: "3 values in your key files look like examples or placeholders, so they are not traced" under "Not checked" (`keys.placeholders`, `notChecked: placeholder-values`) and on the card. A passphrase of nothing but common words cannot be told from an example and is among them. On 240,000 random secret-shaped values 3 were left out. - **A word that is only a folder's name no longer links the home folder, an ancestor of it, or a pattern's text.** On the owner's machine "8 keys were sent to web.archive.org" by a `for` loop whose `grep -o -E '… users starred …'`, inside `$( … )`, held the word `users`, which matched `/Users` (an ancestor of every key file) with the case ignored, and the `curl` beside it carried the blame. A bare word now links a folder only if it resolves, as a path, joined to a folder the command runs in (`tar czf - Documents` after `cd ~`), or, when those folders are not all known, if it is spelled exactly like the end of the key file's own folder or of a folder inside a folder the command runs in. Never the home folder or a folder it is under (`/Users`, `/home`, `/`), and never in another letter case. A path argument (`~/Documents`, `$HOME/Documents`, `../../Documents`, `/Users/me/Documents`) still counts: `tar czf - ~/Documents | curl -T -` is sent. What `echo` and `printf` are given, the pattern or program of `grep`, `egrep`, `fgrep`, `rg`, `sed`, `awk` and `jq`, and the quoted text of those stages (told apart by the quote-aware cut, so a `$(…)`, a backtick or a loop body is cut out of the stage that holds it) are text, not paths. - **A heredoc written to a file is text, if the shell does not expand it and its program cannot run it.** `cat > f <<'EOF'`, `cat <<'EOF' > f`, `tee f <<'EOF'`, `cat >> f <<'EOF'`, and `cat <<'EOF'` alone are not an environment printer and not a request, whatever their lines spell: a test file that spells `curl -d "$(env)" https://…` sent "CLAUDE_CODE_MESSAGING_TOKEN to another company". The delimiter must be quoted (`<<'EOF'`, `<<"EOF"`, `<<\EOF`), or the body must hold no `$` and no backtick: an unquoted body is expanded by the shell (`cat > f <&1`. Decoded data that is run, written to a file, handed to a process, piped into a shell or any other command, or a program that reaches interpreter frames or tracing, is still denied; so is every program that starts a process or imports a module Stroq does not know, as before. - **Deleting a named folder under `/tmp` no longer asks.** `rm -rf /tmp/test_output`, `/var/tmp/name` and a name in a Mac's per-user temp folder (`/var/folders///T/name`, spelled out) are routine cleanups. A variable for the temp directory (`$TMPDIR`, `$env:TEMP`) is not trusted, since Stroq cannot see the shell that expands it, and still asks. It still asks for the folder itself, a pattern at its first level (`/tmp/*`, `/tmp/foo*`), `..`, a trailing slash (which follows a link at the name), a variable it cannot read, a link that leads out of the temp directory, `--no-preserve-root` and a credential file (`/tmp/.ssh`, `/tmp/server.pem`). A path of more than one name is judged only when nothing else on the line could put a link there first. None of this applies when the project itself is under a temp directory: there every delete under it asks. On Windows it still asks: `/tmp` there is a folder on the current drive, not the system's scratch space. - **A delete whose path climbs out of the project with `..` now asks.** `rm -rf tmp/../../x`, `rm -rf ./../x`, `rm -rf a/..` and an absolute path through the project (`/work/project/../x`) were allowed because only a path that began with `..` was checked; `find a/../../x -delete`, `xargs rm`, `Remove-Item -Recurse` and `rd /s` follow the same rule. A `..` that stays inside (`build/../dist`) is unchanged. A pattern before a `..` (`src/**/../../x`, `a/*/../b`) asks, since the shell decides how many folders it covers. ## [0.29.0] - 2026-10-29 ### Added - **`stroq console` opens a local security console for your agents on 127.0.0.1.** `npx @stroq/cli console [--workspace ] [--port ]` prints a private link whose key is new on every start. The first page, Protection, answers whether each agent is asking Stroq before it acts: Not connected, Needs attention, Not seen yet (hooks in place, no call recorded) or Connected (a call was recorded on this machine). Connected means hooks are in place and a call was seen, not that every action is covered. Under it, the week: what the journal recorded each of the last seven days (denied, asked you, flagged, and how many were allowed) and since your last visit to that workspace's page (kept in your browser), with the days and lines it could not read named as such, and the next three things to do, each a command to copy or a page to open. An optional threat feed, off until you turn it on in Settings, downloads pwn.watch's public list of incidents on the console's own server and shows those that name a package this project lists, a coding agent set up here, or a supply-chain attack in an ecosystem the project uses, each linked to its page; nothing about the project is sent, and a match is something to check, not a finding. **Live** follows recorded decisions as they happen and can notify you; **Activity** keeps them. **Agents & coverage** adds or removes Stroq's hooks for Claude Code, Cursor and Codex CLI after a preview of the exact file change, with a copy of the old file, and offers **Test hook** (the built CLI judges two fixed events in a throwaway home) and **Test in agent** (your real agent on a throwaway project, request-capped, on your own subscription). **Settings check** reads 14 agent settings files and lists the settings that switch off or loosen protection, and names every file it could not read. **Try an action** shows what your policy would decide for a command, read, write or fetch, clean and after a poisoned README, without running it. Skills & MCP inventory and review, investigations, sessions, secret exposure, policy changes with a test before apply, and MCP call control sit under **When you need it**, and a **Guide** page says what each page is for. The console listens only on loopback, needs no account and has no telemetry; with the threat feed on, it downloads that one public list; adding hooks from it needs macOS or Linux. Windsurf is not offered in the console: it became Devin, which reads `.devin/hooks.json`, so the old Windsurf hook files would not reach a Devin user (`stroq init --agent windsurf` and `stroq uninstall` are unchanged). - **`stroq replay --all` looks back at every agent session on this machine.** It reads the Claude Code sessions of the last 30 days (`--days` from 1 to 365; at most the newest 300, each at most 64 MiB), judges each recorded tool call against the policy in force in a throwaway home, and says how many would have been denied or asked about and how many tool results looked like an attack, then lists the sessions to open first with the `stroq replay --transcript` line for each (`--json` for the numbers). Nothing runs, nothing is sent, and your real `~/.stroq` is not touched. It does not look for your secrets (`stroq sent` does), and it cannot see what ran outside the agent. The console's home screen offers it as a next step while nothing has been recorded yet. - **`stroq mcp --call-control ` lets the console pause new tool calls of one MCP server**, and **`--tool-approval`** (with `--strict`) withholds each tool version until its exact contract is approved in the console. The call-control history is signed with a key under `~/.stroq/keys`, so a rewritten history does not resume a paused server; this is tamper-evident against a process that cannot write `~/.stroq/keys` (Stroq's hooks deny an agent's writes under `~/.stroq`), not a boundary against a process of the same user that can read that key or put a key of its own there. Both need macOS or Linux: on Windows, where file modes cannot say that only you can read a file, a proxy started with either option refuses to start. ### Changed - **Hooks start faster.** Node's compile cache (kept under `~/.stroq`, only in private folders, never on Windows), commands loaded only when they run, a smaller rule bundle, YAML read only when needed and rules compiled on the first scan took the median wall time of a hook on an M4 with Node 26 from 178 to 78 ms for PreToolUse, 255 to 167 ms for a short PostToolUse and 331 to 242 ms for a 60 KB one. Node 22 and 24 gave similar numbers. The rest is mostly V8 compiling regular expressions, which only a resident process would remove. - **`stroq run --sandbox` now refuses to start when `srt` is missing**, before any preflight, secret-index refresh or write, including with `--dry-run`. It used to say so and continue without the sandbox. `--force` overrides repository and hook preflight refusals, not this one. - **MCP tool approvals and the `stroq harden` manifest are signed with the same key under `~/.stroq/keys`, so a rewritten file does not approve a tool or steer `harden undo` unless the writer also reads or replaces that key.** Approvals saved before this version are not carried over: the proxy withholds those tools until you approve them again in the console. A `harden` manifest written before this version is refused with what to do (move it aside and run `stroq harden apply` again; earlier entries stay in the files and `undo` will not remove them), and `undo` refuses a backup whose bytes are not the ones recorded. A running MCP proxy also refuses a signed record or call-control history older than one it has already read, or a different one at the same point. The limit: a writer that kept an older genuine file can put it back before a proxy starts, and that proxy will accept it. `stroq run --sandbox` write-protects these folders. - **A policy file that is there but cannot be read is refused instead of replaced by the default policy.** A dangling link, a folder at that path, a home that is a file or a file you may not read used to fall back to the built-in policy without a word; the hook now denies, and the bench, attack, live and task commands say whether they used your file (with its digest) or the default. A missing file still means the default policy, as before. - **`stroq inspect` reads more of what a git hook or lint-staged can run, and lets a list of agent protections grow.** A pull request that adds a rule to `permissions.deny` or `permissions.ask`, or a tool to Gemini's `tools.exclude`, no longer fails, as long as every rule it adds is well formed. A `.lintstagedrc` file and the `lint-staged` key of `package.yaml` are read like the one in `package.json`. Plain `stroq inspect` reads lifecycle scripts more coarsely. A script that uses a variable, names a `.git` path, unpacks an archive or sets a git template now fails it, and so does every other script when a lifecycle script does more than a short list of known commands. docs/GUIDE.md lists each case. - **More credential files count as reading secrets (`fs.secrets`) in a shell command:** the `~/.aws` and `~/.gnupg` folders, `.docker/config.json`, `.azure/`, `credentials.json`, `service-account*.json`, Terraform state (`.tfstate`), `.pypirc`, and `.env` read through a glued `<.env`. As before, such a read is allowed in a clean session and denied once the session has read something hostile. A file tool's read of these names (`Read`, `Grep`, a path an MCP tool is given) is not counted yet. Of 47,681 commands of a developer's own history, 7 more count as reading secrets: 2 read a `credentials.json`, 1 asks git whether one is ignored, and 4 only name one or the `~/.aws` folder in the text of a heredoc or of a script they edit. - **A flag on your own text no longer taints the session.** When Stroq flagged a file of the project read with `Read` or `Grep`, or what a local command printed, the session was tainted as if the agent had read a hostile page, and from then on every network command, web fetch and secret read was denied. Now the session notes the flag instead: what is copied from that text is asked about (`ask-origin-untrusted`, and the reason says the text was flagged), and so is a call that reads secrets in a command that is not all local programs (`curl -d @.env …`, `mail … < .env`, `git push` after adding `.env`, `node -e` reading it, a script that does), the calls such text could ask for without the agent copying a word of it. The warning the agent gets says the session is not restricted, and `stroq why` names the note. A flag on somebody else's text taints as before: a fetched page or a search result, an MCP result or tool list, a file the agent loads as instructions (also when a command names it), a dependency's files read with any tool, a file the session downloaded, read back, and what a command printed unless every program it runs is one known to print only local text (reading and searching files, `git` without the network, the project's tests and builds when their scripts are local, a known test or build tool already in `node_modules/.bin`). `curl … | sh` and a known secret in an outbound call are denied whatever was read. A file in a working copy an agent keeps of the project (`.claude/worktrees//`, `~/.codex/worktrees//`) is read as the project's own file; before, the `.claude` on its path made every such file an instruction file. Two scenarios of `stroq attack` are now asked about rather than blocked (06, a project note asking for the environment to be sent out, and 36, an upload script written after reading a hostile README): 15 blocked, 21 asked, 0 passed through. On 387 sessions of a developer's own projects (the last 30 days, outside this repository), replayed by the version before and by this one, the sessions with a stop went from 9 to 7 and the stops from 1,233 to 1,198: most of the rest follow flags on text somebody else wrote (a file fetched from GitHub, a server's output over `ssh`, a teammate's pull request read with `gh`), and one of those flags was true (an attack's commands in a web server's logs). - **A question about a value copied from text the agent read is asked once.** When you let such a call run, Stroq learns it from the host's report that the call ran, and the same value (a package, an address, a command the text named) is not asked about again in that session, for the same kind of action (a value let through in a read is still asked about in a network command); another value still is, and a value copied from somebody else's flagged text is still denied. While another command or MCP call of the session is still running, the answer is not learned, so a call the agent ran meanwhile cannot pass for the one you let through; after a call that may go on in the background (`… &`, `nohup`, `tmux`, `run_in_background`, `Monitor`), no answer is learned for the rest of the session, and you are asked each time, as before. Any new flag, on your own text or on somebody else's, forgets what was let through. It needs the host to give the call's id with both the question and the result, as Claude Code does; elsewhere Stroq asks each time, as before. The agent cannot answer for you by running Stroq's hook itself with an event it wrote: `stroq hook` run through a shell is now a change to Stroq's own state (`config.self`), denied like `stroq untaint`; like it, a command line that names it in a quoted pattern or a here-document (`rg 'stroq hook'`) is denied too, which on a real history of 47,681 commands were 6, all while developing Stroq itself. ### Fixed - **Fewer false stops on ordinary work, measured on 500 public agent sessions.** Replaying 500 coding-agent sessions with real execution (NVIDIA's SWE-Hero OpenHands trajectories, CC-BY-4.0: 191 repositories, 28,347 tool calls) through the engine gave 94 interruptions in 20 sessions; now 27 in 15, and tool results marked suspect went from 406 to 49. An absolute path with a long folder name (`/workspace/OpenSourceEconomics`) was read as an encoded blob, so every later command in that folder looked copied from untrusted text; it is now read as a path when it starts at a known root, has word-like segments and decodes to no text (xz or UTF-16 blobs, which also start with `/`, stay atoms). Ten rules whose conditions fired on ordinary code and program output (`token = None`, `{x.__class__.__name__}`, `getattr(obj, name, None)`, `# type: ignore[override]`, byte escapes, a library's warning, framework class names) now read a narrower form of those conditions on the developer's own files and program output, and keep the broad form for text somebody else wrote (a later entry narrows some of them there too): tool descriptions, MCP results, fetched pages, the output of a command that reaches the network (or cannot be read), files in dependency folders such as `node_modules`, and instruction files (now also `.clinerules`, `.kiro/steering`, `.roo`, `.junie`, `QWEN.md`, `CRUSH.md`, `CONVENTIONS.md`). Every attack example of those rules still fires on every surface, which a test checks, so an instruction planted in a cloned repository's README is caught whether it is read, `cat`-ed, grepped or seen in `git log`. The attack corpus was unchanged by it (36 scenarios, 0 passed through; 500 fuzzed variants, 0 escaped), and so is the documentation bench (18 of 121), since documentation is read as text somebody else wrote. With the inline Python entry below, the same 500 sessions give 22 interruptions in 11 sessions (0.08% of tool calls): 6 questions about a fetch from a host that first appeared in text the agent read (a README, a fetched page, a program's output), 5 denials of network or secret access in sessions that had read text marked suspect, and 11 inline Python programs that start a process in a way that is not read in full. - **A script that the same command line downloads or writes and then runs is judged by where its text comes from, as well as by what is on disk.** A script a command runs is read from disk at the moment of the decision, and a file the same line writes first is not on disk yet, or holds something else. The file on disk is still read, so an append keeps what it held, and now each earlier write of the same path is judged too: a script downloaded and run in the same line (`curl -o x.sh … && sh x.sh`, `curl -O`, `wget`, a redirect of a fetch, through `timeout`, `sudo -E`, `env` or `if … then`, into another folder with `--output-dir` or `wget -P`, into a temporary file such as `"$tmp"`, or inside a `bash -c` body) is denied as `curl | sh` is (`deny-encoded-exec`), and so is a decoded blob run by any name (`base64 -d > f && ./f`); a program downloaded and run by its path (`curl -Lo tool … && ./tool`) is asked about; a script written from text (`echo`, `printf` with its escapes, a here-string) is read as that text, and one written from a variable is asked about; a copy, a move or a link carries what it copied, into a folder too, and a symbolic link from the folder it is in (`curl -o a … && mv a x.sh && sh x.sh` is denied the same way, and `cp wipe.sh x.sh && sh x.sh` reads `wipe.sh`); and a script that is not on disk, run after the line fetched, decoded, unpacked, cloned or ran an inline program, is asked about wherever the command itself runs it, and in the text read out of the command (a heredoc, an `sh -c` or `docker … bash -c` body, a substitution) where a shell runs it or it is run as `./x` or by a path from the root through a folder. A piece read out of the command (a substitution, a backtick, a process substitution, the commands of a body) is taken where it runs, inside the command it is in and in the order of that command's text (a piece that comes twice in one body at each of its places): what it downloads, unpacks or writes is known before a script the line runs after it (`x=$(curl -o y.sh …); sh y.sh` is denied, and so is a script a substitution may make some other way, `x=$(python3 -c …); sh y.sh`, asked about), and not before what runs ahead of it (`sh x.sh; v=$(curl -o x.sh …)` reads `x.sh` as it is), and a substitution among a command's words runs before that command (`sh y.sh $(curl -o y.sh …)` is denied). A shell's startup files that are not there are asked about where the line starts the shell that reads them (`HOME=d bash -l`, or `export ZDOTDIR=d; …; zsh`), not where it sets `HOME` for another program; a program in a virtual environment or `node_modules/.bin` (`venv/bin/pip` just after `python -m venv venv`) only where the line unpacked an archive or cloned a repository into its folder, and a program that is there counts as possibly replaced in that case only. Assignments alone (`A=$(python3 x.py)`), a redirect, a path from the root with no folder in the text read out of the command (a piece of a `sed` program), the end of a quoted string cut out of a command (`Error" /tmp/log.txt`, from `grep -E "a|Error" /tmp/log.txt`) and a path handed to a call in a body's Python (`Path('/tmp/x.jar')`) run nothing; a script named in another piece of that text a shell would not take (a quote left open, a parenthesis glued to a word) is still read when it is there and judged by what the line wrote to it, and only not asked about when it is missing, and a comment no longer makes a body such a piece (`bash -c "… sh y.sh # it's"`). The line is read with the variables it sets to a literal put in place as the shell runs it (`M=run.sh; bash $M`), up to 2 KiB a value and 32 KiB a segment: a name keeps its value until the line gives it another in any way (at the front of a command, also after a redirect, `env` or `sudo`, `read`, `for`, `select`, `unset`, `let`, arithmetic, `${S:=x}`, in a condition or a function, however the command is spelled, as `\read` or `command -p read`; and every name at `eval`, `source`, `printf -v`, `declare -n` or a name spelled with an expansion, `read "$n"`; `echo S=1` is a word, not an assignment), and a script named by a name the line gives a literal and then another value, in its own segments, in a body or in a here-document's line, is asked about where the reading cannot tell which value runs (in a substitution or a body). A path written more times than are judged is asked about, and on macOS and Windows a name is matched without case. The same holds among the processes of an inline Python program, which are also read together as one script. With the next entry, the 500 public sessions give 21 interruptions, one fewer than before both; the attack corpus, the documentation bench and the actions bench did not change. Of 47,681 commands from a developer's own Claude Code and Codex history, 113 are classed differently from before this and the inline Python entry: 2 lose a false `shell.exec_encoded`, 1 gains it (`exec(open(f).read().replace(…))`), 7 count as reading secrets (see Changed), 1 is asked about for a release downloaded, unpacked and run in the same line, and 102 gain `shell.unparsed` only because the scripts they ran from scratch folders have been deleted since, which a replay cannot read. - **Fewer false flags on the developer's own files and command output in Russian-language projects and deploy tooling.** Replaying a developer's own sessions with `stroq replay --all` showed two rules flagging ordinary work, and each flag tainted the session, after which every network command and secret read was denied (a flag on the developer's own text no longer taints, see Changed): `ATR-2026-00202` took two Cyrillic letters within 60 characters of "ignore", "override" or "instruction" for an injection (`.gitignore`, Flutter's `IgnorePointer` and Russian notes all have them), and `STROQ-2026-00004` took a deploy CLI's `upload-app … --apiKey`, `send(token`, git's "Fast-forward … .env" and an `echo` that names `.env` for an instruction to exfiltrate. On the developer's own files and command output, `ATR-2026-00202` now needs the override itself ("ignore previous" and its kin) before the Cyrillic words, and `STROQ-2026-00004` reads an instruction to send a key file (`~/.ssh`, `id_rsa`, `~/.aws`) as before, needs a remote destination (a server, a URL, a host, an address) for one to send a token, a password or `.env`, and needs `cat`, `read` or `dump` for a read; text somebody else wrote is read as before here (the next entry narrows both there too), and every example each rule documents still fires on every surface. On the 500 public sessions, tool results flagged went from 49 to 42 and interruptions from 22 to 21; the attack corpus, the documentation bench and the actions bench are unchanged. - **Fewer false flags on text somebody else wrote: a teammate's pull request, a server's output, a dependency list.** Once a flag on your own text stopped tainting the session (see Changed), most stops left in replays of a developer's own sessions followed flags on text the developer did not write, which still taints: a pull request read with `gh` (`os.environ` in a diff, byte reprs, Russian notes beside `.gitignore`), a server's output over `ssh` (a listing of `~/.ssh`), a dependency list (`dotenv` next to `axios`) and a framework's code comment ("Send users who have no password to the set password page"). Five rules now read narrower forms, each kept to what the rule's own attack examples need. On every surface: `ATR-2026-00202` (byte escapes must spell printable text; Cyrillic words count only after "ignore previous", "ignore your instructions" and their kin, and after "override" only with "your", "the", "all" or "previous" and their kin, not in "override rules для проекта"), `ATR-2026-00554` (a dunder attribute needs double braces, or in single braces a chain of two that reaches for `__mro__`, `__subclasses__`, `__globals__`, `__builtins__` or `__import__`, as in `{x.__class__.__mro__}`, not `{self.__class__.__dict__}`; it reads at most 2,000 characters inside double braces and 200 inside single ones, for a long chain without a closing brace took it 1.8 s on 200 KB), `ATR-2026-00030` (a failed status followed by "fallback" needs "switch to", "use alternative" or a fallback that disables, bypasses or skips something) and `STROQ-2026-00004` (its send form passes over `post` as an HTTP method before a path, `localhost` or a flag that names no key file, as in `POST /api` or `-X POST -H …`, over a token, a secret or a password named in a URL's path, as in `POST https://api.example.com/v1/tokens`, and over a relative clause on people, as in "send users who …"). Everywhere but tool descriptions and instruction files, where a bare mention is evidence: `ATR-2026-00115` (`os.environ` and `process.env` need a send, post, upload, request, dump, log or display on the same line, a `params=`, `json=` or `data=` before them, or a send or a request on the next line, and "load .env" a send, an extract, a request or a print after it), whose `dotenv`-near-an-HTTP-library condition is also no longer read on your own text. Every example each rule documents still fires on every surface, which a test checks. On 387 of the developer's sessions of the last 30 days, replayed before and after, flags on tool results went from 64 to 46 and, with the entry on scripts above, stops from 1,392 to 1,256 (replayed a day after the own-text entry above, the sessions having grown): denials of network and secrets in flagged sessions from 1,001 to 442, while questions, which those denials used to hide (most of them in one session, see the next entry), went from 189 to 634; the sessions with a stop stay at 7 of 387. On NVIDIA's set of 1,272 indirect prompt injections the same 13 are asked about as before, and the attack corpus, the 500 public sessions and both benches are unchanged. - **Fewer false flags on a project's own API notes and security tests.** In a replayed session of a developer's own project, all seven flags were on text the project itself holds, and they made 388 questions about later calls that read `.env` in a command that was not all local programs (`docker compose --env-file …`): `ATR-2026-00114` took the project's API notes (`POST {base}/api/…` with a token header) for an instruction to send a token, `ATR-2026-00568` took the cloud metadata address named by the project's own SSRF test for an attack, and `ATR-2026-00571` and `ATR-2026-01451` took the XSS test vector `` for one, also where a test runner in the project's container printed it, which tainted the session for 208 calls. On the developer's own files and command output, `ATR-2026-00114` now needs a destination after the token (`to`, `into`, `at`, `via` or `on` an address, a host or an IP, also in quotes or brackets), and `ATR-2026-00568` a metadata path after the address, however it is spelled (`/latest/meta-data`, `//latest`, `/./latest`, `/%6catest`). On every surface, the two XSS conditions need a handler that reaches for something to steal or a way to run code within its value, which may run over several lines (the cookie, storage, `fetch(`, a URL, `eval`, `atob`, `import(`, `Function`, a timer or a constructor given a string, `window.location` and its kin, a property by brackets): an `alert` alone is a proof, not an attack on the agent. Every example each rule documents still fires on every surface. In that session the flags went from 7 to 0 and the stops from 654 to 272; over 387 of the developer's sessions the stops went from 1,256 to 874, and the sessions with a stop stay at 7. The corrections of two later reviews (in the rules of this entry and the one above, and in the script reader) changed none of these decisions: replayed again later the same day on 391 sessions with 11,134 calls (a long session past 128 MiB read too this time), the version before them and this one both stop 1,056 times, in 4 sessions. What is copied from the developer's own text, flagged or not, is still asked about: leaving it out let a rephrased note in `TODO.md` (`stroq attack --fuzz`) send `env` to the host it named without a question. - **An inline `python -c` program is judged by the processes it starts, not by the words in it.** A command the program spells out (`os.system('git init')`, `subprocess.run(['python', '-m', 'pytest', 'tests'])`, a word it gives a name once, `exec(open('test_x.py').read())`) is read as a command of the line, the way a `sh -c` body is: its classes count, a script it runs is read, and where the program moves to another directory (`cwd=`, `os.chdir`) the script is read there. The old word pattern (`subprocess`, `os.system`) is set aside only for a program read in full that imports nothing but known standard modules. A program that builds a command as it runs, starts a process another way, hands a shell the input of the line, keeps code in a string, changes the environment before starting a process, writes a file or reads from the network and also starts a process (what it starts may be what it wrote or fetched), or imports a module whose code is not read keeps the old answer (denied), and is now asked about where the old pattern did not see it at all. On the same 500 sessions, 5 of the 16 denials of this kind are gone (programs that run pytest, run a test file or read an exception's documentation); the 11 left build a file name as they run, import the project's own package, run code they generate, or write a file and then start a process. A test runs programs under Python's audit hook, which refuses every process before it starts, and checks that the interpreter starts nothing the reader did not read, on hand-written programs and 1,200 generated ones; the findings of an adversarial review are fixed and covered by tests. - **`stroq mcp --tool-approval` no longer ends the whole session on ordinary events.** A cancelled call, an argument with a number beyond 2^53 or a key named `constructor` made the proxy withhold every later call until restart. Now a cancellation only closes that request, a number that cannot be read exactly or a repeated key refuses that one request with its reason, and keys are plain data. A new listing, `list_changed`, a server line the proxy cannot read, an unpaired answer or use of the proxy's private request ids still end the current approval, each covered by a test. - **A workspace check no longer reports clean where it did not look.** A workspace inside a larger git repository, and a `.git` nested inside the project, are now named as places not checked, so the result is partial instead of clean. A project with submodules, nested clones, or under a home folder that is itself a git repository therefore always reads as partial. A `.git` inside `node_modules` is still neither read nor named. - **The console refuses a one-use task-access review whose text has characters you cannot see** (bidirectional controls, zero-width and other invisible characters), naming the character by its code point, so the text a person approves is the text that is signed. ## [0.28.0] - 2026-10-21 ### Added - **`stroq inspect --changed-from ` fails a pull request that adds something an AI agent or an editor runs by itself.** That covers agent hooks and the scripts they run, MCP servers, editor tasks that run when a folder opens, agent settings that change what runs or where traffic goes, new permission rules, dev container settings, install scripts, package manager config files, git hooks, hidden characters in instruction files, committed bare repositories, and links that lead out of the repository. It compares each entry with the base and fails on what is new or changed. Anything it cannot read, or has to cut short, fails the check too. `--format github` writes a job summary and annotations, `--fail-on new|any|none` picks what fails, exit 3 means the check could not run, and a folder that does not exist is now exit 2 (it was 1). Plain `stroq inspect` reads the same entries in a folder, with or without `.git`. The check errs toward failing: an honest change to one of these files fails it too, and docs/GUIDE.md lists each such case and what the check does not read yet. ### Changed - **`stroq --help` is short: 16 lines and the 7 commands most people need, in two groups (Check and Guard).** `stroq help --all` lists the other commands, one line each, grouped by job. `hook` and `mcp` are no longer listed, since Stroq writes them into your agent's config for you. No command was removed or renamed, and `stroq --help` still prints every option. An unknown command now points at `stroq help --all`. The help for `init`, `add` and `prove` is rewritten in plain words. The false-positive issue form asks for the agent, the Stroq version, the command and the output of `stroq why`, and a new false-negative form is for something risky Stroq let through. - **`stroq sent` checks every agent session on this machine and says where each of your keys went.** It reads Claude Code (with subagents and the large outputs it saves), Codex and Cursor sessions, also under `CLAUDE_CONFIG_DIR`, and compares them with the keys in your `.env` files, `~/.aws/credentials`, `~/.npmrc`, `~/.netrc`, Docker config and environment. Each key it finds is listed once, under the most serious place it reached: sent to another company, maybe sent, seen by the AI, used with its own service, or blocked before it ran. "Used with its own service" needs a strict proof, and "seen by the AI" is a fact, not a promise that the key stayed anywhere: every report says that a script, a file or a variable can carry a key out unseen, and anything Stroq could not read or had to cut short is listed under "Not checked" and makes the report incomplete. `sent` writes nothing and opens no connection. `--here` limits it to this project, `--counts` prints numbers only for a fleet script, and `--fail-if third-party|any` sets the exit code (`--fail-on-finding` is `--fail-if any`). The `--json` report has a new shape (`stroq-sent/2`); in `--counts`, `found.model_only` is now `found.seen` and the old name stays for one release. - **The live egress guard knows more of your keys.** It now also reads `.env.production.local` and other `.env` names with more dots, `*.env`, `.envrc`, and the folders above the project up to the repository root, and it reads a quoted value with a comment after it, both forms of an escaped value, and an AWS secret that starts with `/`. A password inside a database URL is a key for `sent` only, so a command that uses the project's own database URL is not newly denied. - The Claude Code plugin no longer falls back to `@stroq/cli@latest` while npm does not have the pinned version yet. It runs the previous release instead (`STROQ_FALLBACK_PIN`), so the code that guards your agent is always an exact version. The plugin also has its own README, saying what it runs, downloads and writes. ## [0.27.0] - 2026-10-19 ### Fixed - **`stroq add` refuses a symlinked `~/.stroq`, `store` or `run` folder before asking for confirmation, and the runtime pin surfaces its fixed refusal phrase without changing the mode of existing folders.** Previously `stroq add --kind mcp` succeeded when `STROQ_HOME` was a symbolic link while the runtime pin then refused to start (`cannot verify a linked store folder`) behind the generic proxy refusal, and `privateRunDir` changed the mode of `~/.stroq` to `0700` even when it did not create the directory. On POSIX, existing runtime parents writable by other users are refused without changing their modes. - **The plugin wrapper keeps its scratch directory through an npm-to-npx fallback.** Only the parent wrapper runs cleanup: stopping a watchdog before it starts can otherwise run an inherited exit trap and remove the directory before npx uses it. - Garbage-collection warnings name the unreferenced copy that could not be removed, including orphaned copies, rather than a revision intentionally retained for rollback. - Host-filtered attack replay checks partial visibility by phase and tool; absent shell output, page bodies and Claude WebSearch pre-hooks are unsupported. Generated host evidence escapes Markdown table separators and HTML placeholders. Benchmark report paths use forward slashes on every OS so `check:reports` is reproducible across Windows and POSIX. - **Unaddressable strict replies no longer leave clients waiting for their own timeout.** Malformed replies beyond the bounded id reader and responses with unknown ids fail the outstanding requests with fixed errors. This can also fail unrelated concurrent requests on that wrapper; duplicate completed replies do not fail newer requests. - **POSIX shutdown escalation reaches descendants after the launcher exits.** The process group still receives SIGKILL while inherited pipes remain open. Benign-message cap errors now identify the shared forwarded/withheld counter consistently in client responses, stderr and audit records. - **Strict scan cost documentation includes per-string views.** Each distinct decoded string adds a scan view; the 0.26.0 measurements below describe the original three aggregate views, not the current scan count or latency. - **Answer waiting client requests on batch server messages in strict mode.** A readable server array is withheld whole as `invalid-shape`, and all waiting client requests whose IDs it contains are promptly answered with fixed errors rather than left waiting. A malformed batch or one above the line limit fails all pending requests: its first id alone cannot identify every response being withheld. - **`stroq add --kind mcp` now writes a stable Stroq entry path under `~/.stroq/cli/` instead of a temporary `npx` cache path.** When `add` is run through `npx @stroq/cli`, the wrapper written to the client config and recorded in `passports.json` (`written`) points to the stable copy in `~/.stroq/cli/`, matching `stroq init`, so pruning the `npx` cache no longer breaks the confirmed wrapper or forces a pin mismatch on re-init. When a wrapper's recorded entry path no longer exists on disk, `stroq doctor` fails the `mcp proxy` and `mcp pin` checks and prints the `stroq init --agent mcp` or `stroq add --kind mcp --force` command to run (#245). If a stable copy cannot be created, add refuses before confirmation and asks for a global install instead of silently recording the temporary cache path. Linked or non-directory CLI copy destinations are refused before any existing bytes are replaced. - **MCP removal refuses an explicitly selected client config that differs from the recorded installation target.** Confirmed and pending installations keep their recorded write boundary; selecting an orphan in another config cannot remove the recorded installation instead. - **Recover from an interrupted MCP installation and clean up orphan wrappers.** When `stroq add --kind mcp` is interrupted between writing the client configuration and updating the confirmation lock, a pending lock record preserves the replaced configuration entry so `stroq remove --kind mcp --force` safely removes the unconfirmed wrapper, restores the replaced configuration entry, and frees stored server files. Unconfirmed wrappers can also be re-installed using `stroq add --kind mcp --force`. Cancelling an interrupted update restores the prior confirmation as well as the wrapper. Pending retries resolve the recorded source and target by name and refuse another config. Orphans with no record can be removed with `--force --config ` or `--force --client `. Thanks @kok-o (#247). ### Added - **`stroq add --rollback` restores the previous revision of an updated skill or MCP server.** Store garbage collection now retains exactly one previous revision per installed skill and MCP server until the next update or removal. `stroq doctor` reports retained previous revisions and the disk space they use. An update can be rolled back with `stroq add --rollback`, requiring the typed digest and recording an audit receipt. - **Per-host channel reporting for `stroq attack` and generated `docs/HOSTS.md`.** `stroq attack --host ` filters scenario steps by the channels each host can actually see (shell commands, file writes, file reads, MCP calls, tool results, web fetches), counting steps a host never sends as `unsupported` rather than a defence. `docs/HOSTS.md` is generated from the machine-readable channel matrix and verified in CI alongside coverage and bench reports. Thanks @kok-o (#231). - **`stroq exposure` reports strict wrappers separately.** Matches `stroq doctor` by counting and displaying the number of wrapped MCP servers running under `--strict` in the `wrapped by Stroq` row. - **Process-group termination on POSIX.** MCP server processes are spawned detached on POSIX so that `killChildTree` terminates descendants by signalling the entire process group (`-pid`), preventing orphaned grandchildren when commands are launched via `sh -c` or `npx`. - **Decoded strings view for end-anchored rules under `--strict`.** Strict mode scans individual decoded strings in isolation so that rules requiring sentence-end matches (`$`) cannot be evaded by subsequent result fields. - **Forwarded server messages are counted, audited, and limited.** Server-initiated messages permitted in strict mode (`ping`, `list_changed`, plain `progress`) are audited as `mcp-strict-forwarded` and counted against the benign message limit. ## [0.26.1] - 2026-10-19 ### Fixed - **Reading a lockfile, a page of links, a registry's JSON or a long wrapped install list no longer marks a session's provenance incomplete.** Only a package, a pipe-to-shell or an encoded blob can raise the floor of an incomplete session, so only losing one of those marks it: 200 or more in one result, text past the 200,000 characters read, a runner or installer line longer than the 2,048 characters read after it, or a failed write. URLs and hosts have a budget of their own and a subresource-integrity hash (`sha256-`, `sha384-` or `sha512-` and a digest of the right length that does not decode to text) is no longer read as an encoded blob but is recorded as a hash, the cheapest atom there is (it never marks a session and has a budget of its own: 128 in one result and 2,000 in a session), so that a command which carries the same token still finds its record. Hashes are kept in a file of their own, `.prov.digests.json`, and not in the records file, so that an older Stroq sharing the directory never meets a kind it does not know. A hash that does not fit is a narrow loss, noted apart: a blob that no record accounts for is then asked about, a package or a pipe-to-shell command is not, so a big lockfile does not make every later install a question; a labelled token that decodes to text is still a blob, and so is every token on a page that was flagged. Go's `h1:` hashes are read the same way. Lines read after a runner or installer are held to a budget for each pass, and a spent budget counts as a loss in every pass. When a session holds more than the 2,000 records it keeps, the oldest clean records go before any flagged one, and URL and host records before the others, and the session is marked only if a record that can raise the floor goes; a flagged record is dropped only when flagged records alone outgrow the cap. - **Eighteen bundled rules no longer read long repetitive text in super-linear time, and a result that was read and could not be scanned makes a command that sends something out a question.** The patterns of eighteen bundled rules (twenty-two conditions) were slow on long repetitive text, long runs of blanks or line breaks, or a long line of quote marks, in a tool's response or a file. They are replaced, through `rules/atr-overrides.yaml`, by patterns that match the same strings in time linear in the text (a few bounds were added on purpose and are listed in the file). The build's timing gate now gives every field Stroq supplies the blob it times, and has repetitive prose, short words, hyphenated words and runs of blanks and line breaks among its blobs, where it gave a rule only its `content` and three shapes before. The gate also has runs of `[`, `(`, `{`, `<`, `|`, `\` and `"`, and a link or marker that never ends. A marker that a result is being recorded now names the process that put it down and the time by which that hook had to be done (the longest hook deadline and two seconds). One whose process is gone, whose time has passed, or that cannot be read is a result that was read and never scanned (the hook was stopped before it finished), and makes a command that sends something out (a network command, a push, an encoded execution) ask, as a package nobody recorded does; `stroq untaint` clears it. - **A scan that does not finish, or a result that cannot be read, leaves the session marked incomplete.** The marker that a result is being recorded is now put down before the result is scanned, for every tool that is scanned, and comes off when its records are written. A hook that is stopped by its deadline, or fails, between the two leaves the session reading as incomplete, so a package, pipe-to-shell or encoded blob that was never recorded is asked about, as it is when a note could not be written. The cost is one small file written and removed per scanned result (a fraction of a millisecond). The directory a session's markers stand in stays, empty, after the last is off, one for each session, until `stroq untaint` removes it: taking it away could race a marker that is being put down in it. - **A call that runs beside a result that is still being recorded is not asked about a package for it.** The marker that a result is being recorded goes down before the scan of every result, so a call that ran in parallel (a batch of tool calls; the agent had not seen the result yet) found the session incomplete and was asked about a package nothing had lost: `npx some-unknown-tool` three times in three, `pip install requests` twice in three, in a probe. A marker whose process is alive and whose deadline has not passed is a post in progress and no loss now; it counts, as the marker an older version wrote (which names no owner) and one that cannot be read do, once it is stale. A result whose hook was killed leaves a marker whose process is gone, and the session asks as before. - **A command spelled across lines, or with a long run of flags before its package, is matched against what the session read like the plain command, and a command that cannot be read to its end is asked about.** The continuation lines of a command (a backslash before a line break, or an indented line) are joined as they are in a result, and 2,048 characters are read after a runner or installer instead of 512, so a flagged page that named a package is matched by these commands too. When the runner or installer line of a command is longer than that, or holds more packages than are kept, the part that was not read is put to you as a question (`origin.untrusted`) in a session that is flagged, incomplete, or has recorded something; a session that has read nothing is not asked, and neither is a long command whose package was found before the end of what was read. Commands are read as the shell reads them as well: a backslash in a word (`e\vil`, `\pkg`) and a backslash with its line break (removed with nothing in its place, where a wrapped page has a space) are both read, so neither spelling hides a package; a runner whose `-p` may be named again past what was read, and a package that is the value of a variable (`npx $PKG`), are asked about in a session that has something to be checked against. A word in the place of a package is read when, once unquoted as the shell does (`ev"il"-pkg` is `evil-pkg`), it is made of the characters of a package name and nothing in it was a character the shell expands (a variable, a command, a brace, a glob, a bracket, a redirection), wherever in the word it stands, a version and the end of a word included; any other is a doubt of the same kind, and so is a quote that is never closed. A backtick in a command is part of a word, so a commit message that quotes a command in backticks is asked about in a session that has something to be checked against. Every package flag of a runner names a package, and so does each name in a value that lists several (`-p`, `--package`, `--package=x`, `-p=x`, `-px` for `npx`; `--from`, `--with`, `-w` for `uvx`), and so does the first word that is not a flag; a short flag with a value stuck to it that the runner does not have is a doubt. - **A later page that repeats a flagged package's name no longer turns the denial into a question.** When an atom has several records in a session, the most recent one is used unless an earlier one was flagged: a flagged record wins until `stroq untaint`. An atom that was only ever read in clean pages is still asked about, and what a page you trusted (`stroq trust`) names is still recorded clean. - **The default MCP proxy reads the strings in `structuredContent` as text, as well as its JSON form.** A page held in a structured value had its line breaks written as the two characters backslash and `n`, so a command after a line break of its own was not found by the patterns that need the start of a line, and was found when the same page was in `content` or under `--strict`. The strings (decoded, one to a line) now come first and the JSON form after them, within the 200,000 characters read. The strict `default` view is this reader, so `--strict` scans at least what the default scans; its other views are unchanged. A test rig that read the sessions directory as files now skips the marker directory that is written beside them. - **The Claude Code adapter reads every string in a result that is an object, not one of its fields.** A result that held `content` beside `structuredContent`, or `text`, a file or `stdout` beside another field, was read through only one of them, so a page in the other was read by nobody. The known shapes are read as they were (the `text` of an item, the `content` of a file, the streams of a command, the items of a list), all that are present and in that order, then the other string values of the object, then the serialised object for the rules written for JSON syntax. A result with one field of text is read exactly as before. A key a known shape did not read (a `stdout` that is not a string, the other keys of a file object) is read like the rest, and so is a `type` that is not one of the labels of an item. The `filePath` and `path` of a file object are left out only when they are the path that was asked for, or a single string with no blank in it; any other value there is read. - **The words beside an image, a sound or a video in a result are read.** Only the keys that hold the bytes (`base64`, `data`, `bytes`) are left out of a media object; a caption, a description, a title or a transcript beside them is scanned and recorded as it was before bytes were left out. - **A session whose provenance state is corrupt names itself and the way out.** The denial of a command that has an atom said only that the state was corrupt and gave a path that holds a hash. It now carries the session id and the command to run outside the agent, `stroq untaint --session `. The guide says "200 or more" where the code flags at 200, and describes the floor, the order records are dropped in, the marker and the doubt about a command that cannot be read. - **A result nested thousands of levels deep is read to its leaves, and a result that cannot be read leaves the session marked incomplete.** Reading such a result overflowed the stack before the engine was given anything, so it was neither scanned nor recorded and the hook answered with nothing. The adapter now reads past 64 levels without recursion, the default MCP reader does the same for `structuredContent`, serialising a value that deep is allowed to fail, and a result whose reading fails at all is posted as unread so that the marker is written. The default MCP proxy, which scans such a result now, delivers it as the server sent it when the warning cannot be written into a value that deep, where the answer would otherwise have been lost. - **A package a flagged page named is denied wherever the command puts it.** A word in the place of a package that held a character the shell expands was dropped whole, so a flagged package in a subshell or a command substitution, with a `&` or a redirection after it, with a version taken from a variable or with extras was asked about and not denied, as the plain command was. The word is read as a name and a suffix now: the name is always recorded and so found, and the suffix (a version, extras, a bound, a fragment, a trailing `!`) never makes the command unread; the characters that end a word in a shell, where nothing quotes or escapes them, end what an installer goes on to read, and extras are recognised as extras are written. A name that cannot be told apart (a variable, a glob, a brace, a backtick or a quote that never closes inside it, or brackets that a name goes on past) is still unread, and no half of it is recorded. - **A command substitution stuck to the end of a flagged name is denied, not asked about.** ``npx evil-helper-fix`true` `` , `npx name$(date)` and `npx name$SUFFIX` were denied by 0.26.0 and became a question when the word with an expansion in it was left out whole. When the expansion is the whole of what follows a clean name, the name before it is recorded again, and the command stays a doubt (the real name may be longer). An expansion in the middle of a name, or one followed by more of it, still records nothing of it. - **A package name nobody can read is a doubt where the command will run, and where the line does not prove otherwise.** A runner or installer in a commit message, a here-document, a comment or a quoted string is a mention of one, and a word in the place of its package that the shell would expand counted as a command that could not be read, so a session that had read something was asked about it; so was every MCP call whose text said how to install something. A command is read by its words now, as a shell reads it (quotes, substitutions, comments, here-documents, separators, assignments and `sudo`, `env`, `time`, `nohup`, `xargs` and the like, and the one quoted string given to `bash -c`), and a runner or installer that is the word of a command is read from those words and asked about for its name. A mention is still read for the package it names, so a flagged package in one is found, and it is no doubt only where the line proves it inert by a rule that is closed and small on purpose and denies by default for the whole line: the quoted message of `git commit`, `git tag` or `git notes add` (or a here-document given to one), the arguments of `echo` and `printf`, or a line that is only a comment, on a line every command of which is `echo`, `printf` (not `-v`), a message command of git without `-e`, `--edit`, `-c` or `--config-env`, `true` or `:`, with no pipe, redirection, substitution, backtick, group, condition or function, no assignment of a variable that names a program (`GIT_*`, `EDITOR`, `VISUAL`, `PAGER`) and nothing in front of the command. Any other command on the line clears it for the whole line (`export`, `trap`, `alias`, `set`, `read`, `git config`, another subcommand of git, a command named by an expansion, a function definition, `eval`, `xargs`, a shell, `ssh`, `su`), and so does every match when the line holds something that hands a string to a shell it does not show. The arguments of an MCP call are text, except the ones under a key that names a command line (`command`, `cmd`, `script`, `shell`, `run`, `exec`, `args`, `argv`, `commandLine`, at any depth) and every argument of a tool whose name says it executes, which are read as a command line too. A quoted spec with blanks or a separator (`"pkg >= 1"`, `"foo; python_version<'3.9'"`, `foo@">=1 <2"`) is one word, a `#` that begins a word starts a comment, and a quote that never closes in a word makes the rest of the line unread without letting a later closer end the command. The options that take a value are each installer's own (`--path`, `--git` and the rest take one for cargo and not for npm). The reason names the cause (the name, or the length), and the way out of a doubt about one call is approving it, where `stroq untaint` is named only for the doubts about the session. Of 49,181 commands from this machine's Claude Code transcripts, 515 held a runner or installer: none of the 434 that only ran one is asked about for a name, before or after, and 15 of the 79 that only name one in running text are asked about for it, as before (138 per 1,000 mentions): the proof of inertness is small enough that none of those 110 mentions is proven. - **A result the strict MCP proxy withholds no longer leaves the session marked incomplete.** The readings of one result share a marker that says a result was read and not yet recorded. A clean extra view put it down and nothing took it off when no primary view followed, and when a later view timed out or failed the result was withheld, yet the session stayed incomplete until `stroq untaint`. A clean extra view puts no marker down now; one that taints does, before the taint is written; and a result the proxy withholds gives up its scope (`StroqEngine.abandon`), which takes the marker off, since nothing of it reached the model. What a suspect view tainted stays. A primary post that really did not finish keeps its marker. - **A flagged package is found behind the options, the spelling and the verbs a command may use.** `npm --prefix app install x`, `pnpm -C app dlx x`, `pip -q install x`, `python -m pip --quiet install x`, `cargo +nightly install x`, `/usr/local/bin/npx x`, `"npx" x`, `n''px x`, `npx.cmd x`, `npm isntal x`, `bun add x`, `poetry add x`, `go install x`, `deno run npm:x` and `npm i alias@npm:x` were allowed after a page that named the package had been flagged, where the plain command was denied. The runners and installers are one table now (npm and its short verbs, pnpm, yarn, bun, pip, `python -m pip`, poetry, pdm, conda, uv, pipx, cargo, go, gem, bundle, deno, brew), read the same way from a page and from a command, so a page that names a package with `bun add` records it. In a command the options between the tool and its verb are passed over, with the values of the ones that take one, and an option nobody knows that has a value before the verb is a doubt; the tool may be spelled with a path, quotes or a Windows extension; `npm:` and `jsr:` specs and aliases name the package behind them; a `create` names `create-` as well; `uv run --with` names its packages and not the program. The options that take a value are each tool's own (npm, pnpm, yarn, bun, pip, uv, cargo, poetry, go, gem), compared as written, the flags of a Python interpreter before `-m` are passed over (`python -u -m pip install x`, `py -3 -m pip`, `-mpip`, `uv run python -m pip`), and where the words cannot be matched with certainty (an option nobody knows, a value that is also a verb, more options than are looked at, an unknown interpreter flag, a verb after a word that is none) the command is a doubt and the packages after the verb are still read, never the answer that it is no launcher. Not read (listed in the guide): a tool in a variable or an alias, eval wrappers, system package managers other than `brew install`, a repository cloned and built, and a tarball or URL spec no page repeated. Of 2,353 tracked files of this repository, 5 are read as cut before and after, and the package atoms from them rose from 2,016 to 2,037. - **A Python package is the same package in every spelling of its name.** After a page that named `evil-helper-fix` had been flagged, `pip install evil_helper_fix` and `pip install Evil.Helper-Fix` were allowed. A name is recorded and looked up in the form PyPI treats as one (lower case, every run of dashes, underscores and dots one dash) for `pip`, `python -m pip`, `uv`, `pipx`, `poetry`, `pdm`, `conda`, `uvx`, `pipx run` and `uv tool run`, on the page side and the command side alike, and a dependency of the project in `requirements.txt` or `pyproject.toml` is known in every spelling. An npm name is kept as it is written. - **A page that names a package with another tool is found by a Python installer that spells it differently, and a project dependency is known only to its own registry.** A page that named `evil_helper_fix` with `npx` recorded only that spelling, and a later `pip install evil-helper-fix` was allowed. A name with underscores, dots or doubled dashes is now recorded as written and in the one form of PyPI, and a page that names one with a Python installer is also recorded as written. And a name in `package.json` or `node_modules/.bin` no longer made `pip install` of the same name silent, nor one in `requirements.txt` or `pyproject.toml` `npm install`: each is known to the commands of its own registry (npm, PyPI) and to no other. An npm command is still read as written. - **Updating, linking and initialising with a package name a package too.** `npm update x`, `npm up`, `npm upgrade`, `npm link x`, `npm ln`, `yarn upgrade x`, `yarn up`, `pnpm update x`, `bun update x` and `pnpx x` were not read as launching a package, and `npm init x`, `npm innit x` and `npm create x` (which run the package `create-x`) were not either. They are in the table the page side and the command side share, and an initialiser records `create-` as well as ``, so a page that names one spelling is found by the other. - **Every alias of a package manager is in the table, and `pnpx` reads the options of pnpm.** `npm isntall` and `npm udpate`, `pnpm install-test`, `pnpm it`, `pnpm upgrade`, `pnpm link`, `pnpm ln`, `yarn link`, `yarn global upgrade`, `bun a`, `bun link`, `bun c` and `gem update` (`gem up`) were not read as naming a package. The aliases are the ones in each manager's own table, and a test reads every one from a command and from a page, so a spelling that is missing fails there. `pnpx -C dir x`, `pnpx --dir dir x`, `--filter`, `--reporter`, `--allow-build` and the other options of pnpm that take a value read `x` as the package, not the value, and `npm init @scope` (and `create` of pnpm, yarn and bun) names `@scope/create`, which `npx @scope/create` is found by. - **A runner behind an option that takes a value names the package after it.** `npx --loglevel silent x`, `npx --otp 123456 x`, `npx -w app x`, `uvx --prerelease allow x` and `uvx --default-index URL x` were read as running the first word after the option (`silent`, `123456`, `app`, `allow`, the URL), and `x` was lost, from a page and from a command. When a flag that is not known to take no value stands before the first word, the next two words are candidates too (three in all). A runner with nothing like that before its package still names one package, and a candidate that cannot be read is no doubt, so no command asks that did not. - **An MCP call that spawns a program with its arguments is read as one command line.** `{command: 'npx', args: ['-y', 'x']}` was read as two strings of text, `npx` and `-y`, and the package after it was lost on the line break. An object that has a program (`command` or `cmd`) and a list of arguments (`args`, `argv` or `arguments`) is joined into one command line for any tool, at any depth, besides the readings the arguments already had. ## [0.26.0] - 2026-10-18 ### Added - **`stroq mcp --strict` (and `stroq init --agent mcp --strict`) withholds the server messages Stroq could not fully read and scan.** The default proxy forwards, unscanned and untainted, a result above 8 MiB, a line that is not JSON, a response nobody asked for or with the wrong id type, server-initiated requests and notifications (sampling, elicitation, roots, log lines), a JSON-RPC error carrying text, a result whose scan throws, image, audio and blob payloads, unknown result keys and text past the first 200,000 characters, and one ~100 KB result could hold the proxy for 12 to 18 seconds. Under `--strict` each of those is withheld, audited as `mcp-strict-` without the server's words, counted, and the client's request is answered with a fixed error (it is never left waiting). Scanning runs under a hard 4-second deadline, `_meta`, `outputSchema` and item annotations are now read, a delivered image or sound must be what its media type says, and a server with more than 20 malformed or hostile withheld messages (`--strict-max-withheld`), or more than 1000 log and progress ones, is ended (a message with those names that has an `id` is a request and counts as hostile); a request being judged or audited at that moment is answered with the same error and never written to the ended server. Only `ping`, the three `list_changed` notifications and a plain `notifications/progress` are still forwarded when a server starts the exchange. `--strict --cloak` cloaks only what was scanned whole and now answers what the cloak drops. Default behaviour, `--cloak` on its own and every existing wrapper are unchanged; `doctor` shows strict wrappers apart. This is a filter in the proxy, not a sandbox for the server: it cannot undo what the server already did, and it re-writes the messages it delivers. A result is scanned as up to three texts, each on its own, and is as suspect as the worst: the default proxy's own text (the same reader, unchanged, so a sentence spread over several content blocks or fields is found as the default finds it and strict mode scans at least what the default scans), the decoded strings of the message (every string and key; never only the JSON form, in which a line break between words hides a sentence from the rules), and the result as JSON (the first 200,000 characters, the window the default proxy clips to; no string is cut shorter) for the bundled rules written for JSON (`"query": "…'; DROP TABLE`). The three share one 4-second deadline, and the strict handler checks that every string it delivers is in the decoded strings before it scans or sends. One scan is the record of the result: it writes the single audit line the default proxy writes and remembers the atoms of every view once each (so what only an embedded resource's text or `_meta` holds is remembered too, flagged suspect when any view matched); the other views are audited only when they match. This adds three optional fields to `engine.post` in core (`extraReading`, `suspectInAnotherReading`, `otherReadings`); a call without them behaves exactly as before. Lines written under `--strict` carry U+2028, U+2029 and U+0085 as JSON escapes, so a client that splits on them does not cut a message. `stroq init --strict` for any agent but `mcp` is refused rather than ignored. `stroq add --kind mcp --strict` writes and confirms a strict pinned wrapper. Changing the confirmed wrapper requires the typed digest; later updates keep its recorded `--strict` and `--strict-max-withheld` arguments. `init --strict` leaves wrappers confirmed by `add` unchanged and prints `stroq add --kind mcp --strict --force` to confirm the change. - **`stroq vet --online` reads npm and GitHub packages before installation.** Downloads are bounded and checked against the requested source, every redirect is held to the host, scheme, port and user information of the first request, and package contents are inspected without running them. A GitHub ref may hold slashes (`feature/x`) and is asked for with the slash as it is; a ref with an empty, `.` or `..` segment or a backslash is refused. Slash refs were tested with an injected transport and not against the live host. Thanks @kok-o (#193). - **`stroq prove --agent codex` checks the recorded Windows host contract.** The fixed allow, deny and control probes use the existing ChatGPT login after consent. The driver refuses unverified versions and platforms; its evidence concerns hooks, not sandbox isolation. Thanks @kok-o (#195). - **MCP runtime pins verify locally confirmed server bytes.** `stroq mcp --pin` checks the stored tree and runs a private copy; doctor and exposure report pin drift offline. Pins do not sandbox the server or cover dependencies outside the confirmed tree. Thanks @kok-o (#194). - **Local skill installation, update, restore and removal.** `stroq add` confirms the inspected digest before writing verified bytes; `stroq remove` confirms removal and preserves receipts. Changed executable content, expanded capabilities and restores require the typed digest. A folder that looks like two kinds of artifact is refused with the flag to give, and `--kind skill` installs it as a skill. An archive that holds a `node_modules` folder is refused before a digest is asked for, since the stored copy leaves it out. Thanks @kok-o (#196). - **Signed Claude Code tasks and explicit permit extensions.** `stroq task` previews a scope and starts a task with a parent-owned gate; `stroq permit` inspects, extends or revokes it. Isolation requires srt; `--hook-only` is explicitly advisory. Thanks @kok-o (#197). - **`stroq bench --latency` measures hook invocation cost.** Reports processor and wall-time percentiles beside a bare Node baseline, verifies that each scenario actually reaches its audit path, and reads the CLI version from the package manifest. Thanks @Nari-Ab (#191). - **`stroq add --kind mcp` installs a local Node MCP server behind a runtime pin that binds the wrapper it wrote.** After a typed digest it stores the exact bytes by digest, writes a `--pin sha256:` wrapper into the client config and records the pin and the wrapper in `~/.stroq/passports.json`; `stroq remove --kind mcp` deletes the entry or restores the one it replaced. The proxy compares the command line it was started with (node, its flags, the Stroq entry, every flag and the command after `--`) with the recorded wrapper and refuses to start on any difference, so an edited client config cannot hand the confirmed server another secret, run another file of its tree or drop a flag; `stroq doctor` also compares the entry's `env`, `cwd` and other keys and reports a pin that was taken out. A refused or changed wrapper is confirmed again with `stroq add --kind mcp --force`, a line the refusal and `stroq doctor` print with the real name. `stroq init --agent mcp` leaves a wrapper that `add` wrote and the lock confirms as it is, and prints that line. - **`stroq add --kind mcp` refuses a server whose dependencies are not in its tree, so most real MCP servers need bundling into one file first.** A `package.json` that lists dependencies, sources that import a package by name (anything built on `@modelcontextprotocol/sdk` or `zod` does), and files that cannot be read with certainty (a module name built at run time, `createRequire`, `eval`, `new Function` (also through an alias of the global object or of `process`, a string in brackets with escapes, or `Reflect`), the `vm`, `repl` and `inspector` modules, `process.getBuiltinModule`, a node started with text to run (`-e`, `--import`, `process.execPath`) or a package runner such as `npx`, a script the server writes and then loads, a path outside the tree, text the reader cannot tell apart) would load code from a folder that no digest covers. `add` names each file, the line and the reason, and says how to bundle (`esbuild --bundle --platform=node --format=cjs`); `stroq vet` adds the blind spot `imports resolve outside the pin`, so the rules id in a passport (`analysis.rules`) is now `stroq-vet-rules/2`: the same files give a finding that `/1` did not make. `~/.stroq/run`, where pinned servers are copied, is write-protected in `stroq run --sandbox`, with `~/.stroq/node_modules` and `~/.stroq/package.json`, which Node reads above it, so a pinned MCP server cannot start inside `stroq run --sandbox` (the proxy says so in a fixed phrase, and `stroq run` and `stroq doctor` name the pinned servers; this follows from the deny and was not measured with a real srt). `module`, `process`, `globalThis`, `global` and `import.meta`, and `eval`, `Function`, `constructor` and `__proto__` as members of anything, are refused wherever they stand unless the use is one of their harmless forms (`module.exports`, `process.env`, `typeof process`, a parameter of that name, `this.constructor`, and the like), and so is a name that a pattern, a parameter, a `catch`, a `for` head, a default, a rest or an array binds or holds (`function f({ require: r }) {}`, `const [r = require] = []`, `const { process: p } = globalThis`); on esbuild bundles of the 89 packages installed in this repository that refuses 23% of the libraries (13 of 57) and added no bundle to the ones the specific rules already refuse, and zod 4 is refused because it calls `new Function`. The reading of the text is best-effort, with known limits listed in the guide, and not a proof that no import escapes; the enforcement that does not depend on reading, Node's permission model for the pinned server, is future work. - **The confirmation screen of `stroq add` cannot hide the lines that matter.** Rows are ranked credentials, hosts, commands, hooks and install scripts before the tools a skill asks for. Every sensitive row is shown when you type a digest, and a source with more than 80 sensitive lines is refused with the number that would be hidden and the `stroq vet --from --json` command that lists them all. - **Updates of skills and MCP servers show what changed and classify it strictly.** The screen shows a bounded diff (40 lines per file, 200 in all, every line written out; a long line is shown by the part that differs and a part over 2,000 characters is cut and counted in the last line) of each changed text file against the stored version. Only an added or changed top-level `README`, `CHANGELOG`, `LICENSE` or `CONTRIBUTING` (`.md` or `.txt`, still plain text) asks y/N; a change to `SKILL.md`, a command, an agent, `docs/` or any other file, a removed document, any added `allowed-tools` entry and any new capability line need the typed digest. - **A damaged store does not block `stroq remove`.** Removing a skill or an MCP server needs the digest from the lock and not the stored bytes, with or without `--force`. A restore or an update whose stored copy is damaged refuses and prints the two commands to run, built from the lock record (the config, start file, variables and directory of a server; the scope of a skill), with the error that the store reported kept as its cause. Clearing the old stored copy after a removal or an update is best-effort: a copy that cannot be cleared (a link where its folder should be, say) is kept with a warning, and the command, which had already changed the config and the lock, succeeds. Every command line Stroq prints for pasting (the lines above, `stroq vet --from`, `stroq untaint --session`, the OpenClaw install lines, the reproduce line of a card) is built by one helper with a whitelist, not with clever quoting: a name, path, source or id from a lock, config or package is written bare only from `A-Za-z0-9_@%+=:,./-`, between single quotes only when nothing in it means anything to any shell (no quote, backslash, `!`, control, hidden or direction-changing character), and otherwise no command is printed at all, only a plain sentence that says so. The value of an option is always written `--flag=value`, so that a leading `-` in it is part of the value; a positional that starts with `-` is not printed at all (a `--` before it would not protect it, since Stroq looks at every argument for an unknown option and for `--help` before a command reads them). On Windows the lines are written for cmd.exe and PowerShell, with double quotes and the same refusal for `"`, `%`, `^`, `!`, `&`, `|`, `<`, `>`, a backtick and `$`. ### Fixed - **Provenance now records when its evidence is incomplete and asks rather than treating the source as clean.** A session notes when a trace record was dropped at the per-session cap, a result held more than the atoms kept or the characters read, a wrapped command ran past the part of a line that is read, a prose tool's result had no text in it, or a write failed. Until `stroq untaint`, a package spec, pipe-to-shell or encoded blob with no record is asked about (`origin.untrusted`); a record still on hand keeps its class, and `stroq why` names the reason. - **Harden undo removes empty directories created by apply.** Cleanup preserves the project root, existing or non-empty directories and paths reached through symlinks. A failed first apply also removes an empty manifest; rollback failures preserve the original error. Thanks @Nari-Ab (#189). - **Harden recognizes single-dash password flags.** Credential-shaped values under those flags are masked instead of copied into diffs; the parser remains bounded on long input. Thanks @Nari-Ab (#190). ## [0.25.1] - 2026-10-13 ### Added - **`stroq vet --from` reads an archive as well as a folder.** A `.tgz`, `.tar.gz` or `.tar` (told by its bytes, not its name) is read in memory by Stroq's own tar reader, without a dependency and without writing a file: one shared top folder (`package/`, `owner-repo-sha/`) is taken off, and the passport and the `stroq-tree/1` digest are those of the folder the archive was made from (checked against `npm pack`, `git archive`, bsdtar and Python's tarfile). Anything that is not plain files is refused, not skipped: links of either kind, devices, FIFOs, sparse files, unknown entry types, a path that the tree rules refuse, a name that is not UTF-8, data after the end, a second gzip member, a bad checksum, and an archive past the limits (5,000 files, 8 MiB a file, 32 MiB expanded, 20 MiB compressed), which is refused before anything that big is allocated. `--expect` works for an archive on every platform. ### Fixed - **Six commands the classifier let through are caught, from the first outside contribution (thanks, @Nari-Ab, #147).** `rm -rf .*` and `rm -rf ./.*` delete every dotfile of the folder (`.git`, `.env`, the agent's settings) and had no class; they are a dangerous delete now. PowerShell takes `/` as well as `-` before a flag, so `powershell /EncodedCommand …`, `certutil /urlcache` and `bitsadmin -transfer` are read as the encoded execution and the download they are. On a server reached by `ssh`, `docker compose down --volumes` is destructive like `-v`, and a bare `cd` goes back to the login directory, so a relative `rm -rf` after it is judged there. A working tree given with a trailing slash no longer makes every path in it look outside, and a working tree of `/` (or none) holds no absolute path, so `rm -rf /etc` from `/` stays dangerous. - **The GitHub CLI's token file is a secret.** `~/.config/gh/hosts.yml` (on Windows `%AppData%\GitHub CLI\hosts.yml`) holds the CLI's OAuth token when it is not in the OS keyring, and reading it was an ordinary read: `cat ~/.config/gh/hosts.yml` and a `Read` of the file had no class. Both are `fs.secrets` now, for the shell and for the file tools, and `stroq harden` adds `Read(~/.config/gh/hosts.yml)` to the rules it writes. The file alone: the CLI's `config.yml` and `state.yml`, `/etc/hosts` and an inventory called `hosts.yml` stay what they were. Not yet: the secret index does not read the token out of the file, so a token copied elsewhere and sent is not recognised by its value. ## [0.25.0] - 2026-10-13 ### Added - **`stroq prove` checks that the hook really stops things in your agent.** A hook written into an agent's settings says nothing about whether the agent obeys it. `stroq prove` asks Claude Code itself, `claude -p`, for up to three short Haiku requests with your own login (subscription usage; an API key is never used, and the check kills the host at once if it sees one): one harmless command the policy allows, one the policy denies (a `git config` setting that makes git run a program, written to a file of its own, nothing is installed), and the denied one again with the hook out of the way, to show that the host would have run it. A host is `verified` only when the allowed one ran, the denied one was stopped in the hook's own words and left no file, and the same command did run without the hook; a model that declines, a limit, a host that stops the control by its own rules, or a missing billing field is `inconclusive` and never `verified` or `failed`. A third probe (a `curl` with a made-up key) is optional: the model itself usually declines it. Everything runs in a temporary folder that is removed, also on Ctrl-C. Measured on Claude Code 2.1.271: verified in exactly three requests. `stroq doctor` shows the result as `proof:` and marks it stale when Stroq, the policy or the host version changes. It shows that the hook line `stroq init` writes works with that host version; it does not show that your own settings file is loaded, and not that other versions or hosts behave the same. Claude Code only for now; `--dry-run` shows what it would do, `--json` prints the result, `--max-requests` raises the cap (at most 6). An agent cannot run it. - **`stroq vet --from ` reads a skill, MCP server or plugin before you add it.** It reads the folder without following a link or running anything, and prints its passport: what it asks for or can do (the tools its front matter allows, its hooks, the hosts its shell text and code reach, the environment variables and credential files it reads, the programs it runs, install scripts, dependencies that do not come from a registry, native or obfuscated code, symlinks that leave the folder), each marked `[declared]` or `[observed]` with the file and line, sensitive ones first, then the signals and every blind spot (what was not looked at: nothing was run, what it fetches at run time, other languages, prose). The name is the source's where the source names it; a package that calls itself something else gets a `declared-name-differs` signal. A reading that fails is named and the command exits 1, so an artifact cannot hide a finding by breaking a reader. `--json` prints the canonical passport (the same bytes for the same files, to commit), `--expect ` checks the `stroq-tree/1` digest (not on Windows, where a folder has no executable bit), `--card` prints a Markdown snippet for a README, `--out ` writes to a new file. It is a reading of the files, not a security certificate, and it says so. `stroq install` now says that Stroq has no install and points to `init` and `vet`, instead of suggesting `uninstall`. Not yet: `--online` (npm, GitHub), archives, `add`/`remove`. - **`stroq policy check` and `stroq policy test` show what an edit of your policy does before you use it.** `check` reads the file exactly as the hook does and names every fault by its field (a policy that does not load makes the hook fail closed, and it says so), then lints it: a rule that an earlier one always decides first, a protection of the default policy that this one quietly loosens (each of the 20 action classes alone, in a clean and a tainted session: `secret.egress` going from deny to allow is an error), a threshold far above the default's, and a field Stroq does not read (a typo such as `taintt:` silently leaves a rule matching everything). `test` replays the 36 attack scenarios and the 75 scenarios of ordinary work under your policy and under a baseline (the default unless you name one), and prints every step whose decision changed (`/: deny -> allow (looser)`), the attacks that now pass, the ordinary work it now interrupts, and the expectations of your own cases (`--cases`, YAML or JSON) that it breaks; it exits 1 on any of those, on a result that could not be judged, or past `--max-new-interruptions`. Offline and in-process; `--json` for both. - **`stroq harden` makes the host refuse to read your credential files, and takes it back.** `stroq harden` shows what it would change and writes nothing; `stroq harden apply` asks you (on a terminal; elsewhere it needs `--yes`) and writes it through the reversible edit engine, with a copy of the file; `stroq harden undo` gives the file back and keeps anything you changed since; `stroq harden status` says what is still in place. The first recipe adds `Read(...)` rules for the usual credential files (`.env`, `~/.ssh`, `~/.aws`, `~/.config/gcloud`, `~/.kube`, `~/.docker/config.json`, `~/.npmrc`, `~/.netrc`, `~/.pgpass`, `~/.git-credentials`, `~/.gnupg`) to `permissions.deny` of Claude Code's settings (`--scope user`, or `--scope project` for `.claude/settings.local.json`). Measured on Claude Code 2.1.271: the Read tool and a plain `cat` through Bash are refused. It is a filter inside the host and a best effort, not a guarantee: a program that reads the file itself (`python -c`) is not covered, and only `stroq run --sandbox` is. A second recipe writes a marked block into `.cursorignore` for Cursor; it could not be tested here and says so. A settings file with comments is not rewritten: the command prints the lines to add by hand. An agent cannot run `harden apply`, `harden undo`, or `harden --acknowledge-link`. ### Changed - **`.cursorignore` is protected like the other files that switch a protection off.** An agent can no longer write it (`config.self`), because `stroq harden` puts a block in it that keeps `.env` and keys out of what Cursor sends to a model. ### Fixed - **The live-check library reads a stored result only from the file of its kind.** Still a library: no command uses it. A stand-in result moved into the live file is no result, a result dated more than a few minutes ahead of the clock is none either (with a clock set back it would have outlived every install), and the environment the driver is handed no longer carries `STROQ_*` or `CLAUDE_CONFIG_DIR`, which the model's shell inherits (a ledger path it could delete, a home that sends the hook to the real settings). The store says that its file is tamper-evident and not tamper-proof. - **The task-scope library is closed where a review found it open.** Still a library: no command uses it. A task id with no permit file is a deleted contract and refuses every tool (it was "not a task", so an agent that could delete the file turned the task off); an address in a command is a network operation whatever class the command got (`git fetch URL`, `git clone`, `npm install URL` passed a no-network scope), and `--connect-to`, `--resolve` and the proxy options are refused under a scope that lists hosts; `Edit`, `MultiEdit` and `NotebookEdit` list a read as well as a write, so a read deny holds against them; a tool the classifier read no resources of (`Task`, `NotebookRead`, `LSP`) is held as an incomplete call; the approval of an ask names the whole call, content included, and the hint names the first operation still lacking one; the refusal text is redacted in the audit; an MCP name with `__` in the tool is not granted to the server before it; the key store writes its files whole and refuses a key directory that is a link. - **The Safe Install contract refuses more names that are one name on some disk or another.** Still a library: no command uses it. Found by a review of 0.24.0. A path component that a program which narrows names would turn into a separator (`U+FF0F`, `U+FF3C`), any `~` and a digit (an NTFS short name), a look-alike space, and the combining mark U+0345 that NTFS upper-cases are refused; a symlink target may not hold a control, an invisible character or U+FFFD; the parts of an npm or GitHub source have the lengths npm and GitHub allow; `buildTree` takes `{ complete: true }` to refuse an entry with no content, and no longer believes the length a byte array reports of itself; `schemaFault` describes a record's faults without quoting its text. ## [0.24.0] - 2026-10-11 ### Changed - **Attack and action-benchmark JSON reports are version 2.** `stroq attack`, its fuzz mode, and `stroq bench --actions` report policy, corpus and execution context. Timeouts and errors are explicit inconclusive outcomes; benchmarks exclude them from judged measurements. Consumers of JSON reports must handle the new version and fields: in `attack --json` the `ruleId` of a post step now names the first rule that matched (it was always `null`). `stroq attack`, `attack --fuzz` and `stroq bench --actions` exit 1 when anything is inconclusive, and the bench `rate` is `null` then. These are in-process measurements, not evidence of live-host enforcement. ### Fixed - **An interrupted scan can no longer count as protection.** Attack and fuzz runs fail on inconclusive scenarios, and both CI and release gates reject inconclusive fuzz variants as well as escapes. This includes the scan of the text a write puts into an instruction file (`CLAUDE.md`, `AGENTS.md`): when it runs out of its time budget the call is still asked about, as before, but `PreResult.signals` now says `instruction-scan-took-too-long` and a report counts it as inconclusive, not as a rule that held. - **A `;` or `|` inside quotes no longer hides what a command writes.** The plain cut of a command cuts at a separator even inside quotes, so `echo x > '/tmp/a;b/p/.git/hooks/pre-commit'` or `cp payload 'a|b/../.git/hooks/pre-commit'` came apart into two pieces, none of which held both the write and the file, and `deny-git-exec` (and, for a path under `~/.stroq`, `deny-self-tamper`) did not fire. The stages that the quote-aware reading has whole are now read too, besides the plain cut. This was so in 0.23.0 and earlier; it was found by a review of 0.24.0. - **`stroq exposure` counts every incident.** Incidents that timed out or failed were left out of its total, so a machine that could not judge 20 of 36 showed a shorter, cleaner count; it now reports them as `incident-unjudged`. - **Secret scanning skips spans too short to be a secret** before it builds candidates for them, which cuts the time spent on settings files with many short strings by about a third. The candidates it produces are the same. ### Added - **Internal host-verification library.** Correlates issued commands, hook audit and temporary sentinels with a matching no-op control; missing evidence, limits and billing uncertainty stay inconclusive or not attempted. - **Internal reversible configuration-edit library.** Adds bounded previews, JSON and marked-block edits, atomic writes, private backups and undo that preserves later owner edits. Files containing credential-shaped text are not copied into backups; replaced JSON credentials are masked in undo records, and credential-bearing text blocks are not replaced. Linked-target previews require acknowledgement. - **Artifact contracts.** Strict source/passport schemas, bounded trees and the versioned `stroq-tree/1` digest reject unsafe paths, aliases and inconsistent metadata before acceptance. - **Task-scope foundations.** The classifier exposes bounded file/network resources; core scope evaluation validates signed Ed25519 permits and exact-call extensions while retaining hard denies and rejecting incomplete resources. These foundations do not yet provide `prove`, `harden`, `vet`, `add`, `remove`, `task` or `permit` commands, live-host drivers, adapter-wide task enforcement or filesystem isolation. ## [0.23.0] - 2026-10-08 ### Added - **`stroq bench --actions` measures what Stroq does to ordinary work.** The documentation corpus `stroq bench` reads says how often a rule fires on text an agent reads, and rules were fitted to it (40.0% to 24.0% to 14.9% on the same 121 files), so it flatters. Seventy-five scenarios of ordinary agent work (git, builds and tests, searching and editing files, a little network, then reads, edits, web fetches and MCP calls, in the mix of tools one developer's agents use) are replayed in a clean session against the policy in force, and the report names each scenario Stroq asked about, denied or flagged, with the rule. `docs/BENCH.md` publishes it against the default policy. The first fifty were written before they were measured and fitted to no rule, and five were interrupted (10.0%): `deny-encoded-exec` denied a JSON response piped to `python3 -m json.tool` (also over lines that end in `\`), `eval "$(ssh-agent -s)"` and a commit message that talks about `curl | sh`, and `ATR-2026-00032` flagged a git log whose message says "do not skip the previous step". The set includes such shapes on purpose, and 0.22.0 interrupted 4 of the 50 (the continued-line curl was allowed). All five are fixed below and stay in the set. The last twenty-five were written after that, from the shapes real agent work took in a Claude Code and Codex history, and are fitted to no rule either; four are asked about on purpose (an inline Node program, and an inline Python program that reads the environment or writes a file, each reading what `curl` printed), so the rate it publishes, 4 of 75 interrupted (5.3%), is the one that is true. Read it as which scenarios are interrupted and why, not as a share of commands. - **`stroq sent --card` is a card you can share.** `stroq sent` names the credentials a session carried and the calls that carried them, which is why its report cannot be pasted into a post. The card is the part that can be: how many credentials the record of the session holds, under which providers (a fixed table: AWS, GitHub, OpenAI, Stripe, Database, SSH or a private key, …; the label is ours and a credential's own name is never used), how many calls and tool results were read, how many credential files were touched, how many values the check was made against, the agent and the number of sessions of the project, the limits of the answer (a value in a local transcript is not a request to a model provider or a delivery, and a value rotated since is not in the index), and a line to post. `--html` makes one page with no script and no external resource and a policy that allows neither, `--out ` writes it to a file that does not exist yet and never over one, `--json` prints the card as JSON. A session checked against nothing says so and does not say it is clean. Nothing is copied from the report but counts: a test builds a report whose credential names, sources, paths, calls and session id carry markup, a direction override and a private path, and checks that none of it is in any form of the card, and another runs a transcript that carried a real credential to a private host through `stroq sent --card` and checks that the value, the name, the host, the project, the home and the session id are not in what comes out. - **`stroq replay --html` draws the chain.** The history of a session as one HTML file: what the agent read, what the scan made of it, the action it led to and what the policy made of that, as a chain, with the counts of the whole session drawn above it (stacked, on a phone). A recording replayed under today's policy says `WOULD DENY` in a dashed outline, and what was recorded while Stroq ran says `DENIED` in a solid one. Every command, path and excerpt in a session was written by something the agent read, and the page is opened by the person looking for what it did: each is cut, its control, direction and zero-width characters are written out as visible escapes (`neutralizeControls` does the first two; zero-width and tag characters, which it leaves to a terminal, are added here), and it is escaped; the page has no script, no link and no external resource and its Content-Security-Policy allows none. A test builds a model that is hostile in every field (a closing ``, an `onerror`, a direction override, an OSC 52, zero-width characters) and checks that no tag the page holds is one of ours, that none of it is live, and that the text is there to read, escaped. A session too big to show whole says what it left out. `--out ` writes the page to a file that does not exist yet. - **`stroq doctor` says when the host last called the hook.** A hook written into a host's config says nothing about whether the host runs it (hooks switched off, an approval that no longer matches, a plugin that never loaded), and `doctor` read only the config: a firewall that silently did nothing showed a green tick. Each `stroq hook ` now leaves the time of the call in `~/.stroq/last-hook/` (the time and nothing else, mode 600, under 1 ms in a hook process; not measured on Windows or a network home), and the line of an install that is whole ends in `· last hook call on this machine 3 min ago` or `· no hook call recorded on this machine yet`; after an upgrade every agent says the second until its next call. It is a fact and not a verdict, so it does not fail the line: a fresh install has not been called, and a host that has hooks switched off looks like one that has not been used. A host used for an hour whose line still says none is the one to look at, or the home it writes to: the hook says in `~/.stroq/stroq.log` when it could not write the time (a home left to root by `sudo`, a read-only disk, a `STROQ_HOME` the host does not see). It is evidence and not proof, and the agent's on this machine, not the project's: the file is the same for every project and for anything that runs `stroq hook `, the host, you, or an agent with a shell, and it does not show that the host obeyed the answer. A time more than five minutes ahead of the clock is reported as that, because a host that has died never overwrites it. The write opens the file without following a link and without waiting for a reader (a link planted there would have been written through, and a FIFO would have held the hook until the host's own timeout lifted it, which lets the call through); the read takes only a regular file holding a time in the form it was written in. The Claude Code plugin has no `doctor` line, which reads settings files, and the file is written for it all the same. Not added: a comparison with the agent's own transcripts, which would raise that for you. - **`stroq init` on a terminal shows what it will do, asks, and checks that it worked.** It lists the agents on the machine (✔ found, – not), says what it will add, what it will read, what it will write (a copy of the CLI too, when it was started from npm's npx cache) and the command that undoes each, says what else installing does where that is more than a file in the project (OpenClaw's installer runs `openclaw plugins install` and `enable`, for the whole user), and asks before anything is written: `--yes` answers for you and, with no `--agent`, guards every agent it found; `--no-input` never asks and prints what scripts and CI always got. A bare Enter typed before the question could have been read (a key held down while `npx` fetched the package) is not an answer, and a no, the end of the input and an answer that is neither exit 1, so that `stroq init && claude` does not go on as if Claude Code were guarded. It then installs agent by agent behind a spinner, and runs the command it has just recorded the way a host runs a hook (through a shell, an event on standard input, a home and a project of its own, so that it reads none of your credential files and leaves no record in them; the directory it made is removed, and the hook it started killed first, when it ends or is interrupted by Ctrl-C, SIGTERM, a closed terminal or Ctrl-\\) with a harmless action and a `curl … | sh`: it says whether the hook started, what it answered with the default rules, and in how many milliseconds, for Claude Code, Codex, Cursor and Antigravity; the other agents are told to start them once and run `stroq doctor`. The screen is drawn for a person at a terminal: a pipe, CI, `TERM=dumb`, `--no-input` and `--dry-run` get the installer's output, as before, and `NO_COLOR` or `FORCE_COLOR=0` draw it without colour. A line that would not fit is put on two at its spaces (a step and what is said of it; a path, and a command to copy, are left whole), the notes of an installer are joined into the paragraphs they are, and what a note tells you to type (OpenClaw's two commands, where it is not on `PATH`) is shown as lines you can copy. The last line says what is so: `Done. Stroq is guarding Claude Code` only for an agent that has nothing left to do, and an agent whose note says it has (restart it, approve the hooks in Codex, run the two commands) is named as not guarding yet, with `read the warning above` where the note is a warning. Text that came from a repository (a path, an installer's note, a folder name with a line break in it) is made safe before it is written, a terminal that draws only ASCII is written only ASCII, and the cursor comes back on Ctrl-C, SIGTERM, SIGHUP and Ctrl-\\ (not on Ctrl-Z, which stops the process). The two commands of the Gateway's CLI are run without holding the process, for at most two minutes each, and are killed with it, so Ctrl-C and `kill` end `init` there; the copy of the CLI that the hooks run is said to have failed, with what to do, where it could not be made; and the undo of OpenClaw is its own command, `openclaw plugins disable stroq`. A sixth review found more, all fixed: what OpenClaw's CLI printed went through the rules for Stroq's own notes (glued to them, or taken for a line to copy), and is now a block of its own under the command that printed it, a few lines of it, dim, with a failed or stopped command a warning; the first line said that the agent's hooks see the pages it fetches, which Codex and Windsurf do not give them; a command was broken over two lines at a narrow width, and the undo commands are put under their label, one to a line, where they do not fit beside it; a hang-up could end `init` with an uncaught write error and no clean-up, and Ctrl-\ at the question was a core dump (which macOS keeps an unkillable process for); the Gateway's CLI is run in a group of its own that is ended with it, asked to stop first, and waited for for a second after it exits and not for as long as a process it left holds its pipes; an empty `STROQ_HOME` is not a directory; the line that says what is left to do names the agents that were not tested; and a flood of output is cut. Arguments the installer would refuse (`init foo`, `init -- …`, `init --yes=true`) are refused before a question, not after it. `stroq` with no arguments leads with the three commands a newcomer needs, and `stroq init` takes `--yes` and `--no-input`. ### Fixed - **Antigravity on Windows refused every tool call, because the hook line could not start.** `stroq init --agent antigravity` wrote `"C:\Program Files\nodejs\node.exe" "…\index.js" hook antigravity pre`, and Antigravity hands the line to `cmd.exe` with each quote escaped by a backslash, which `cmd.exe` reads as part of a name: `'\"C:\Program Files\nodejs\node.exe\"' is not recognized as an internal or external command`. Node was where the line said it was; the quotes were the trouble. While a hook cannot start, Antigravity refuses every tool call (the terminal, a file read, a fetch), the model is shown the error, and the agent cannot be asked to repair it. On Windows `init` now writes the line for Antigravity, Cursor and Codex with the paths bare and the 8.3 name for a blank (`C:\PROGRA~1\nodejs\node.exe C:\Users\you\AppData\Roaming\npm\node_modules\@stroq\cli\dist\index.js hook antigravity pre`), and keeps it only after starting it the way such a host does: `cmd.exe /d /c` with the line as one argument and each quote escaped (the check `init` made until now went through `shell: true`, which strips exactly those quotes and could not see this). The program is a path and never a bare `node`: `cmd.exe` looks for a bare name in the current directory first, which for a hook is the project's, and a cloned repository could put a `node.cmd` there. If no spelling starts, Antigravity gets nothing written and is told which path has no spelling without a blank (a profile folder with a blank and no 8.3 names), how to install where one exists, and how to take out an earlier install (`stroq uninstall --agent antigravity`, with `--user` for the user config); Cursor and Codex, which have not been seen on Windows, keep the quoted line with a warning. `stroq doctor` calls a quoted Antigravity line BROKEN on Windows, in the plain report and whichever other agents are installed, and says to run `init` again from outside Antigravity or to take the hook out; it reads the bare lines too, and checks the paths in them only where they are absolute (it checked the quoted ones only). The first line a hook wrote on its error stream is now shown with the exit code when the check after `init` fails, which is where `cmd.exe` says why. The check `init` makes after installing now covers Antigravity. Claude Code, Copilot and Windsurf keep the quoted line, which their hosts read (Git Bash, PowerShell's `&`), and OpenClaw and the MCP proxy start Stroq with an argument list, not a line. It is checked against a model of how Windows starts such a line (from `cmd /?` and the error in the report), which gives the reported message for the old line and starts the new one; nothing was run on Windows by the author; the tests that start the lines with the real `cmd.exe` run on the Windows job of CI. An install that already blocks every tool is repaired from a terminal outside Antigravity: `stroq init --agent antigravity` or `stroq uninstall --agent antigravity`, each with `--user` for the user config (`~/.gemini/config/hooks.json`) in place of the project's (`.agents/hooks.json`). - **A fetch piped into `python3.12`, `nodejs`, `perl5.38`, `deno` or `bun` was not denied.** The pipe detector knew an interpreter by the exact names `python`, `python3`, `node`, `perl`, `ruby` and `php`, so `curl … | python3.12`, `| nodejs`, `| php8.3`, `| deno run -` and `| bun run -` were a network command and nothing more, and a clean session allowed them. An interpreter is known by any version in its name now (`python3.11`, `pypy3`, `perl5.38`, `ruby3.2`, `php8.3`), and `nodejs`, `deno`, `bun`, `tsx`, `ts-node`, `lua`, `julia`, `Rscript` and `osascript` are added: a fetch or a decode piped into one that takes its program from its input is denied, as it is for `bash`. - **A plugin user's firewall could be switched off by writing one file.** A plugin user has no hook in `settings.json`: Claude Code runs the plugin's `hooks/stroq-hook.sh` from its plugin cache on every event, and neither that cache (`~/.claude/plugins/cache//stroq/`) nor the clone of the marketplace under `~/.claude/plugins/marketplaces` was on the list of protected files, so a `Write`, or an `echo 'exit 0' >`, to the script there was allowed in any session. They are protected now as `.claude/settings.json` is, by the path as written; the repository's own `plugins/stroq/hooks`, which a developer edits, is not, and neither is the installed `@stroq/cli`, which is run by its path (`node node_modules/@stroq/cli/dist/index.js doctor 2>&1`) as ordinary work. - **A script was a way round the taint-gated denies, and round the secret guard.** `shell.network`, `fs.secrets`, `git.push_external`, `config.instructions` and `shell.unparsed` were not carried from a script to the command that runs it, so in a session that had read something hostile `curl … -d @out.txt` was denied typed directly and allowed as `bash upload.sh`, and the same held for a script that reads `~/.aws/credentials`, pushes to an address or writes `CLAUDE.md`. They carry over now, one level deep like the rest. The secret egress guard read only the command's own text, so `bash send.sh` with a known key inside it and a `curl` was allowed in a **clean** session while the same line typed was denied; it reads the text of the scripts the command runs now. Not carried: `eval "$(tool init)"` and PowerShell's `& $command`, which `nvm.sh` and every virtualenv `activate.ps1` are made of (2 of 358 scripts read on one machine). A script that pushes to a named remote (`git push origin main`) is not touched; one that adds a remote asks, as the same line typed does. In 15,396 shell commands from this machine's Claude Code and Codex transcripts, 58 ran a script and none of the 25 still on disk pushed. - **A FIFO named like a script hung the hook.** The script reader opened the path without `O_NONBLOCK`, so `mkfifo f.sh` and then `bash ./f.sh & curl …` left the hook's only thread waiting for a writer. A host that times a hook out treats that as an allow, so the deny never came: reproduced, no answer in 20 s. The open no longer waits, and a FIFO, a directory or a device is passed over. - **A script could hide its own text.** A NUL byte after the first line (which bash, dash and zsh drop) made the whole file read as binary and unread, and a UTF-16 PowerShell script, which Windows PowerShell 5 writes by default, decoded to a NUL between every letter. Both are read as the shell reads them now, and a script that exists and cannot be read is `shell.unparsed`, not nothing. - **Many spellings of "run this script" were not read.** `(bash x.sh)`, `./x.sh&`, `bash x.sh>/dev/null`, `/usr/bin/env bash x.sh`, `bash ./"x.sh"`, `bash ./x\.sh`, `bash /dev/stdin /dev/null`), in a here-document (`bash <<'EOF'`, `cat <<'EOF' | bash`), through `cat`, `tee`, `head`, `tail` or `pv`, as `bash < <(echo …)` or `source <(…)`, behind a line break, `|&` or a comment, inside another string, in a function (`f() { bash <<< '…'; }`) or a compound command given input by a redirect (`{ bash; } <<< '…'`), after `time` or in a `case` arm or a `for` loop, and spelt with `$'…'`, `\x72`, `\u0072` or `$'\cJ'` (a newline in a word). The shell is found however it is written: quoted (`b"as"h`), behind `sudo -u root`, `sudo -s`, `env -S"bash -s"`, `exec -a x`, `eval`, `timeout 5`, `setsid`, `flock f` (and `flock f -c '…'`, which is a shell's string) or `nohup`, as `rbash`, `ksh93` or `su`, as a glob (`/bin/ba*`) or a variable that names one (`$SHELL`, `$0`), as a copy under another name (`ln -s /bin/bash ./z`), as the shell `ssh host sh` starts, or inside the string of another shell (`sh -c 'true; bash'` reads the input its parent was given); `xargs bash` is not one, because what it reads are arguments. The program is decoded where it is a literal, as the shell prints it (`echo` has no `\'`, `printf` reuses its format, and `%5s`, `%*s` and `\155`, which bash, dash and zsh read differently, are a text it cannot know; checked against bash, zsh, dash and ksh on random escapes), and classified as the commands it carries, three levels deep within one budget that every level draws on. A file it names (`cat x.sh | bash`, `bash < x.sh`, `bash <(cat a.sh b.sh)`, `cd sub && cat x.sh | bash`) is read as a script from where the `cd` left the command, inside a decoded program too, and so is one that a decoded program runs. A program that runs on another machine (`echo 'docker rmi prod/app' | ssh host sh`) is judged as a command sent over `ssh` is. **A shell handed a program that cannot be read is `shell.unparsed`**, so an evasion ends in a question and not in an allow: the source is a command Stroq cannot read (`./gen.sh | bash`, `curl … | sh`, `bash <(curl …)`), a stream it cannot name (`<&3`, `/dev/fd/3`, `/dev/std?n`, `>(bash)`), a file whose name expands (`cat "$f" | bash`, `cat *.sh | bash`), a program whose command word is an expansion (`bash -c "$cmd"`, `echo {rm,-rf,~} | bash`, `eval "$(tool init)"`), `echo` or `printf` is redefined in the command, or the line is one the reading is not sure it read: a quote or here-document that never ends, nesting deeper than it reads, or a `|` into a shell that it set aside inside a test, an arithmetic, a `case` arm or an expansion (a second reading that has none of those readings checks it). Where only an argument expands (`echo "rm -rf $dir" | bash`, a `bash <&1`, `&>`) holds it; `|&` is a pipe; a parenthesis against a word is a subshell's; a backslash before a line break joins the lines; and every command is read a second time as the shell reads its words, with quotes and escapes taken off, braces expanded (up to 64 words) and the command word in lower case (not a builtin's: `EXPORT` is a word, not `export`, and a `grep -E "error|EXPORT"` does not dump the environment), which each pattern that looks for `git reset --hard` or `terraform destroy` is matched against too. A string that is only printed keeps its blanks and stays text: `echo 'rm -rf ~'` is not `rm`. Not read: a brace expansion that makes more than 64 words (`{1..99999}`, which is `shell.unparsed` where it names a program), and a subcommand in capitals, which git and the rest do not accept. Found by taking ten commands and writing each 289 ways (after something that ends a command, in a group, behind a keyword or a wrapper, in a string a shell is handed, with quotes, capitals and braces): the 2,890 spellings all keep the classes the command has alone (or ask), 271 of the 288 spellings of `rm -rf ~` that call the recording `rm` ran in bash and 266 in zsh with an `rm` that only writes down that it ran, and none was missed; nor was one of 8,338 stacks of one to three spellings, which a generator wrote and ran in each of them (6,495 ran in bash and 6,067 in zsh), nor one of 66 places where a substitution may stand (tests, arithmetic, indexes, redirects). A command that joins `curl … \` lines to a `| python3 -c '…'` or a `| python3 -m json.tool` is one pipeline now, and `deny-encoded-exec` denies it as it denied the same command on one line: that rule treats any interpreter after a fetch as one that runs what it was fetched, a reading too wide for an interpreter that was given its program, and it is on the list to narrow. - **`stroq exposure` called a rewritten hook protection.** `stroq doctor` fails a hook entry that is no longer the command `init` recorded (the agent reports a hook and something else runs), but `exposure` counted any entry that still ended ` hook ` as guarding the agent, for Copilot and Antigravity as for Claude Code. It asks `doctor` once per agent now, lists the agent as unprotected when its entry has changed, and says why. - **A command that runs scripts has one budget.** Reading costs time in proportion to the text, the hook has one thread, and a host that times it out treats that as an allow: eight scripts of a megabyte each took 32 s to classify. The scripts one command runs share one script's worth of text; past it they are `shell.unparsed`. A megabyte of hostile text now takes about two seconds. - **A project `.devin/hooks.json` switched a Windsurf install off, and nothing said so.** Windsurf's documentation now lives at docs.devin.ai as Devin Desktop, which reads `.devin/hooks.json` first and `.windsurf/hooks.json` only when the first is absent or defines no hooks. `stroq init` writes the second. `stroq doctor` now says `SHADOWED` (and `stroq run` and `stroq exposure` stop counting the install as guarding, and name `stroq init --agent windsurf --user` as the fix, which a repository cannot replace), and `stroq init` says so in its own output. Entries in `.devin/hooks.json` count as Stroq's only when they are the command `init` recorded and its paths exist: the file is the repository's, and a suffix ` hook windsurf` is what anyone can write. An unreadable `.devin/hooks.json`, or one of the wrong shape, is reported as unknown rather than as absent. `stroq uninstall --agent windsurf` removes from that file only the entries that are exactly the command `init` recorded, not any that end ` hook windsurf`; says which file each preview is of; leaves a file that is a link, or is not JSON, alone and says so; and counts an entry that looks like Stroq's only where it is a handler's command, not a sentence in a description. `.devin/hooks.json`, the `.devin` directory as a whole, `.devin/rules` and the Devin system files (`/etc/devin`, `Application Support/Devin`, `C:\ProgramData`, in every spelling a shell reaches it by) are protected from edits by the agent like the Windsurf ones. Taken from the documentation, not from a live build; Devin's command-line agent is a different product with its own files and has no adapter. - **A byte-order mark in front of the hook's JSON made every call fail closed.** `JSON.parse` rejects a leading U+FEFF, which some Windows tools put on piped text, so the agent was blocked for a reason nobody could see. It is stripped before parsing; a mark anywhere else, or on its own, still fails closed. No host is known to send one: this is hardening. - **Text that a fetch printed, or that the command makes as it runs, was run by roads other than a pipe, and allowed.** `$(curl …)` as the command, `x=$(curl …); $x`, `curl … | { read l; $l; }`, `curl … | while read l; do $l; done`, `python3 -c "$(curl …)"`, `perl -e "$x"`, `python3 <<< "$(curl …)"`, `echo "$x" | python3`, `python3 <(curl …)`, `awk -f <(curl …)`, `ssh host $x`, `exec 3< <(curl …); sh <&3` and `mkfifo p; curl … > p & sh < p` classified as nothing, while `curl … | sh` and `bash <(curl …)` were denied; so did the same shapes with the text hidden by something that is not a decoder (`$(echo '…' | rev)`, `$(printf '\x74…')`, `python3 -c "$(echo '…' | rev)"`). A command word, an interpreter's program or a processor's script that is a fetch (`$(curl …)`, a backtick pair) is denied, as `curl | sh` is. A command word that a command substitution makes, whether or not the command fetches (`$(echo touch) x`: what a printer prints is the command; none of 20,011 commands of a real history has one), and a program that is made as the command runs (`python3 -c "$(…)"`, `python3 -c "$x"` for an `x` that the command made, `python3 <<< "$x"`, `echo "$x" | python3`) are asked about. In a command that fetches or decodes, a command word that a variable the command made names, a program that reads from a descriptor or from a pipe whatever came down it, `ssh host $x` and a `mkfifo` are asked about as well. Not asked about: a variable that the command spells out once and no other way (`Q=/path/q.sh; $Q …`) or never mentions (`$HOME/bin/x`, `$EDITOR`), `command -v $t`, a program with a variable inside it (`python3 -c "…$x…"`), what `eval` is given (read as `eval` is), an arithmetic expansion, and a script's own `$(…)` command words. The reading is of one command's text and follows no variable's value: a variable named by a name that is made as it runs is read as not known (`printf -v "$n"`), a command word that a variable made outside a command that fetches (`x=$(… | rev); $x`) is not read, and a file that another command wrote (`curl -o f; sh f`, which was never read) is still not followed. - **`curl … | watch sqlite3` was nothing.** `watch` hands what is piped into it to the command it runs, and the check took whatever it ran for a command that only reads, so `watch vim -es`, `watch mongosh` and a program Stroq had not heard of were allowed. What `watch` runs is read as it is after `xargs`. - **A reader that runs a program was named by its full spelling only.** A tool that parses its options with `getopt_long` takes the start of a long option for it, and the guard knew each by its whole name: `tar --use-comp 'sh -s'`, `tar xIf 'sh -s' -` (the options old `tar` takes without a dash), `sort --compress-p=sh`, `split --fil=sh`, `bat --pag=sh`, `xmllint -shell`, `delta --pager`, `mapfile -C` and `readarray -C` ran a fetched text as a program and were allowed. A long option that is the start of one of those is read as it, and `--` ends the options. - **A name was trusted after `env -P dir` and after `PATH` was set in a way the pattern did not list.** `env -P b head` and `env -C b head` look `head` up in a directory the agent may have written; `printf -v PATH …`, `read PATH`, `for PATH in …`, `PATH+=…`, `export PATH`, `declare -n p=PATH`, `enable -f x.so head`, and `BROWSER`, `SSH_ASKPASS`, `FCEDIT`, `SUDO_EDITOR`, `HGEDITOR` and the other `…EDITOR`, `…BROWSER`, `…ASKPASS` and `…_RSH` names change what a command starts. A variable that changes what a name means is now read wherever its name stands that is not a read of it (`$PATH`, `${PATH}`), not only before an `=`. - **A here-document in a substitution was text where bash 3.2 runs it.** macOS's `/bin/bash` and `/bin/sh` find the end of `$( … )` and `<( … )` by counting brackets and quotes without knowing there is a here-document in it, so a body whose first line is `)` ended the substitution there and the next line ran as a command, while Stroq, like every other shell, kept it as text: `x=$(cat <<'EOF'` with `)` and `curl … | sh` on the lines after it was allowed, and so was one whose `#` comment, in the body or on the line that opens the document, hid a bracket from that count. A body in a substitution is text only when counting everything the substitution holds (the opening line, the body, the closing line) as bash 3.2 does comes out at its end and not before: every `(` closed, every quote paired, no backslash, brace or `$` that does not begin a name, no comment with a bracket or a quote in it; a commit message with a scope and a quotation in it is still text. A command that sets a variable for another command (`BROWSER="$(cat <<'EOF' … EOF)" gh browse`, `HUSKY=0 git commit -m "$(cat <<'EOF' …)"`) is read whole, whatever the variable's name, and so is one that gives `git` an option that runs a program. - **`git` was told to run a program by roads the reading did not know.** `git fetch --upload-pack="…"`, `git push --receive-pack="…"` and `git archive --exec=…` hand their value (and the value of any start of the option: `--upload=`) to a shell on the side that serves the pack, which a local path is enough to be; `git clone -u '…'` is `--upload-pack` too; `git --exec-path=dir` and `GIT_EXEC_PATH=dir` name the directory of the program of every subcommand; `git config remote.origin.uploadpack '…'` (and `receivepack`, `vcs`), `GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=core.fsmonitor GIT_CONFIG_VALUE_0='…'` set the same by configuration, and an `ext::` URL is a command (at the start of a word, as the base that a configuration rewrites a name to, as the value of a URL or of `--remote=` and `--repo=`, as the value of any key given by `-c`, `GIT_CONFIG_VALUE_n` or `GIT_CONFIG_PARAMETERS`, with its quotes taken off, and in a configuration that is written as text: not in the middle of a word, where it is a message or a pattern, `-m 'support ext:: transport'`; a URL that a variable holds, `--config-env=remote.o.url=U`, is asked about): all of them are `config.git_exec`, which the default policy denies. The first reading cut the command at white space, so `git fetch '--upload-pack=touch x' ../src`, the whole option in one pair of quotes, lost its dash and was allowed, and a commit message that talks about `--exec` was denied; options are read by their words now. A sixth review found the same shapes by other roads: `git -c "core.fsmonitor=curl … | sh #" status` (the key and its value in one pair of quotes with a pipe in it, which a reading that cuts the command at every `|` lost, and `credential.helper=!…`, `core.sshCommand`, `remote.origin.uploadpack` the same), `git --attr-source HEAD rebase -x '…'` (an option of `git` that takes a value and was not on the list, so the word after it was taken for the subcommand), `git re"base" -x '…'` (a subcommand written in pieces), `url.ext::sh -c '…'.insteadOF=zz:` (the URL of a transport that is a command, given by what a configuration rewrites a name to), `GIT_SSH_COMMAND+='…'`: keys are read from the words of the command, a key that is made as it runs (`-c "$(echo core.fsmonitor)=x"`) is asked about, the subcommand is looked for among all the words, and an `ext::` where a URL is a command. What `git rebase -x '…'` and `--exec`, `git difftool -x '…'` and `--extcmd`, `git grep -O'…'`, and the variables `GIT_SSH_COMMAND`, `GIT_SSH`, `GIT_PROXY_COMMAND`, `GIT_EXTERNAL_DIFF`, `GIT_EDITOR`, `GIT_SEQUENCE_EDITOR`, `GIT_ASKPASS`, `GIT_PAGER`, `SSH_ASKPASS`, `EDITOR`, `VISUAL`, `PAGER` and `BROWSER` hold is a command line that a tool runs, and is read as one, as the argument of `eval` is: `git rebase -x 'curl … | sh'` and `GIT_SSH_COMMAND='curl … | sh' git fetch` are denied, and `git rebase --exec 'npm test'`, `GIT_SSH_COMMAND='ssh -i key' git fetch` and `GIT_EDITOR=true git rebase --continue` are not. Run with git 2.53 (`git-exec-differential.test.ts`): 39 commands of this kind, each ending in a `curl … | sh`, 34 of which ran it, and none was allowed. - **Code stored in a prompt string or an array subscript was not read.** `PS4='$(cmd)'` (expanded on every traced line), `PROMPT_COMMAND=…` and `x='a[$(cmd)]'; echo $((x))` run a command that sits in quotes, which everything that reads the command takes for text. A command that sets one of them is asked about. - **A line that a shell runs was left out as the body of a document that no shell opened.** A review that wrote 40,000 random commands around `<<'EOF'` and ran what the classifier allowed in bash 3.2, dash, ksh93 and zsh found three roads: a `#` right after `)`, `<` or `>` (`(true)# <<'EOF'`: a comment to every shell, so the line after is a command, and a word to the reading, so it was taken for the body), a line break after a `|` (`cat <<'cat' |` and a line that is the delimiter: the body of a document begins at the line break after the opener, whatever follows a `|`, and the reading began it a line late), and `((` with no white space after it (`((true<<'EOF'))` is an arithmetic to bash, zsh and ksh, in which `<<` is a shift, and two subshells to dash); a `$'…'` string with an escape in it (`echo $'\'' ; cat <<'EOF'`, which dash reads as a string that ends at the first quote) was a fourth. A sixth review found two more: a backslash and a line break join the lines, so the `#` that begins the next line is a comment where a blank stood before the backslash (`echo a \` and a line break and `# <<'EOF'`, which ran the line after in every shell), and bash 3.2 counts the quotes of `$'…'` as its own, so two of them made the count of the body come out even where the shells that read the document end the substitution elsewhere (`x=$(cat <<'EOF'` with `$'\''`, `)` and a fetch on the lines after it). A text with any of those in it takes no body for text, in the command or in what it nests, a body with a `$'` or a `$"` in it inside a substitution is read as commands, the `#` is read through a joined line, and the line break after a `|` begins the body that the line opened. 1,130 commands of that shape run in each of five shells (`heredoc-differential.test.ts`, each fix taken out in turn and caught), and ten seeds of 3,000 to 4,000 random commands, about 3,900 of which the classifier allowed, ran no line that it had not read. - **A command word that `echo` or `printf` prints was let through.** `$(echo touch) x`, `$(echo 'touch x')`, `$(echo eval touch x)` and `nohup $(echo id)` ran in every shell and were allowed, because a substitution that only prints what it was given was exempt from the question a command word that a substitution makes is asked, and the exemption looked at what the printer is given and not at what it prints, which is the command. None of 20,011 commands of a real history has such a command word, so nothing is exempt: `$(pwd)/run.sh` is asked about like the rest. - **A program that is all a parameter was not asked about.** `python3 -c "$x"`, `node -e "$x"`, `python3 - <<< "$x"` and `echo "$x" | python3`, for an `x` that the environment gave and nothing in the command shows, and the script of an interpreter that a command makes as it runs (`python3 <(echo "$(… | rev)")`, `perl <(cat "$f")`), ran and were allowed (`"${x:-y}"` and `"$@"` were asked about, and so was `bash <(echo "$(…)")`). A program is not a path that `$HOME` names, so it is asked about unless the command spells the value out once (`x='print(1)'; python3 -c "$x"`). The commands of a real history that this changes: none. - **`${PATH:=/tmp/bin}` set a name that changes what a command means, and was read as a read of it.** `${NAME:=word}` and `${NAME=word}` give an unset name a value, which a reader that is trusted after a fetch must not survive. - **A function that the command defines hid what it runs from every reader.** `f() { rm "$@"; }; f -rf ~`, `g() { git "$@"; }; g rebase -x '…'` and `g() { git "$@"; }; g reset --hard` classified as nothing, because every detector looks for a program by its name and the call is `f`: the program is in a body somewhere else, and the words it is given are in the call. Each call of a function that the same command defines is now read as one more reading of the text: the body, as a group, with what the call is given put where it uses it and with the redirects of the call after it (a here-document that the call is given, `w notes.md <<'EOF'`, is still the input of what it runs), a function that calls another to five levels, and past `sudo`, a group, `if` and `for` inside a body. A definition is read in the forms that shells take: any name a shell accepts (`1f`, `a+b`, `.a`, `:`, `[`, `é`), `function f`, a body that is a group or a subshell (`g() ( rm "$@" )`), a comment or an escaped line break between the header and the body, after `then`, `do`, `else` and the `)` of an arm of `case`, and with the declaration that zsh allows before it (`export f() { …; }`). A call is the first word of a stage that runs, so a function named like a wrapper (`sudo() { …; }; sudo -rf ~`, and `env`, `timeout`, `exec`, `command`, `xargs`, …) is the call, a call spelled with quotes or escapes (`"g" -rf ~`, `\g`, `g''`) is a call, and `command f` and `builtin f`, which never run a function, are not; nor is a word that a program is started with (`sudo f`, `env f`, `xargs f`: a function is not a program, which is why `ls() { sudo ls "$@"; }` is no call of itself), while `noglob f`, `nocorrect f`, `coproc f`, `parallel f` and `watch f`, which can run one, are, and a call in the argument of `eval` is read where the argument is (`eval "f a"`). A function is in force wherever the shell that defines it runs a command, so it is read in a substitution (`echo $(f -rf ~)`), a subshell, an `eval` argument and a `trap` body, in a shell that is given it by `export -f` (`bash -c 'f -rf ~'`, `find -exec bash -c`, a program that is handed to `bash` on its input), and in the command that `ssh` sends; a name that is defined twice (in the two arms of an `if`) is read as all its bodies, and the copies of the command that a `for` of up to four items makes, each with its word put in, are one function and not five. The words of a call are put in place of `"$@"`, `$*`, `$1`, `${1:-w}`, `${1:+w}`, `${1:?w}`, `${@:2}`, `${@: -2}`, `$#` and `${#@}`, and of the forms that change a value (`${1%.*}`, `${1##*.}`, `${1/a/b}`, `${1:2:3}`, `${1^^}`, `${#1}`) where the value is plain text, worked out as bash and zsh work it (a test runs both against them), once and in one pass, as a value where the parameter is unquoted or inside a string (`g() { $1; }; g "rm -rf $HOME"` runs `rm`; a quote in the value that would not close, `say "it's"`, is written as a letter), as written where it is a quoted word of its own or follows `name=`, in a here-document that expands and not in one that does not, after a `shift` that always runs, and without the redirects that stand among them. A line continued with a backslash inside the words of a call is taken out before the words are counted: `r() { rm "$1" "$2"; }; r \ -rf "$HOME"` moved every parameter by one, and was allowed. What is not read is asked about (`function-call-not-read`), and not allowed: a call past the fifth level, a function that calls itself, a body of more than 16 KiB, with a function of its own in it (one in a string, a comment or a document is text), or another compound command (`g() if …`, `g() [[ … ]]`), a name of more than 256 characters or made with `$'…'`, a here-document that does not end before the function does, a body that uses its parameters in a way that is not put in place (`${10}`, `${!1}`, `${1:=w}`, a value that has an expansion or a glob in it, a pattern with a class, `getopts`, `set --`, a `shift` in a loop or a branch, quotes that do not close), more than 64 definitions, a text of more than 64 KiB, and more texts than the reading may add. That room is shared by everything that is read for the functions of one command (the command, the programs it hands to shells, the text with the line breaks of its strings folded, and what it sends over `ssh`): 256 KiB and forty-eight times the command, a megabyte at most, and what reading them costs as the hook estimates a command, a third of what it may spend on the command itself (a command of eighty kilobytes that defined functions of sixteen and called each twelve times took twelve seconds, where the host gives up at fifteen and allows). The forms of the parameters are paid for by the letters they compare, before they are worked out, from one budget for the command, and a body is not built past the room (`$@` eight thousand times, given words of forty kilobytes, took nine seconds and two gigabytes). A function that the command does not define (one a shell has from its startup file) is not in the text and is not followed; neither is the anonymous function of zsh (`() { …; } -rf ~`), and a script is not read for the functions it defines: what is read of a script is a bag of lines (a line once for each value its variables take), where no function ends where it should. The pattern that finds a definition is linear in the text: a text of 256 KiB of line breaks and blanks took 118 seconds when it was not, and the ReDoS gate times each shape at three sizes now, because a command too costly to read is not read and is fast at its full size, which hid a slow quarter of it from a comparison of two. The 20,449 commands of a real history changed class in none, and of 325 scripts on the machine one did: a demo that only previews `stroq init --dry-run` is no longer taken for a change of Stroq's state. - **Stroq's own state commands could be run from a group, a branch, a loop or a function.** The check that an agent does not run `stroq untaint`, `init`, `uninstall` or `trust ` through Bash read the first word of each segment, and a command that stood where one begins after `{`, `(`, `then`, `do`, `else`, `!`, the head of a function or the pattern of an arm of `case` was not found: `{ stroq untaint --all; }`, `(stroq init)`, `if true; then stroq untaint; fi`, `f() { stroq untaint; }; f` and `case x in x) stroq untaint ;; esac` were allowed. It finds them now, in a function that wraps it and is called (`g() { stroq "$@"; }; g untaint`), behind a wrapper it had no name for (`xargs`, `watch`, `stdbuf`, `builtin exec`, `setsid`), behind a redirect (`> /dev/null stroq untaint`) and in a zsh body in braces (`if true { stroq untaint }`), reading a segment by what the shell makes of it as well as by its words; a text that does not name Stroq is not read for it. - **The command of an arm of `case`, a body that zsh writes in braces and a command behind a redirect were not found by the detectors that read a segment by its first word.** `case x in x) git clone ext::sh -c '…' y ;; esac`, `case x in x) crontab -r ;; esac`, `if true { crontab -r }`, `> /dev/null npm publish` and `coproc crontab -r` were allowed, and the same commands alone were not. The arm is cut from its pattern, a redirect before the command is not the command, and `coproc`, `noglob`, `nocorrect`, `setsid`, `unbuffer` and `fakeroot` are not the command either. - **A line that `watch`, `parallel`, `su`, `sg`, `script`, `entr -s`, `npx -c`, `npm exec -c` and an editor are given to run with a shell was read as an argument.** `watch -n1 'rm -rf ~'`, `parallel 'rm -rf {}' ::: ~`, `su root -c 'rm -rf ~'` (the option after the user), `sg staff 'rm -rf ~'`, `script -qc 'rm -rf ~' /dev/null`, `echo x | entr -s 'rm -rf ~'`, `npx -c '…'`, `vim -es -c '!rm -rf ~'` and `sshpass -p x rm -rf ~` classified as nothing. Each is read as the line it hands to a shell, as `sh -c` and `eval` are (`watch -x` and `parallel --no-shell` run what they are given as it is, and the values of `parallel` are put after the line); `at` and `batch`, which run what they are given later, are a scheduled task, as `crontab` is. - **A command behind a program that runs commands was found by one reader and missed by another, and a line given to a multiplexer or a watcher was text.** `flock /tmp/l rm -rf .claude`, `chrt 10 crontab -r`, `taskset -c 0 crontab -r`, `strace -f …`, `runuser -u nobody -- …`, `unshare -m …`, `nsenter -t 1 -m …`, `systemd-run --user …` and `chroot /x …` were allowed where the bare command is denied or asked about: the reader that cuts a stage into words knew some of these programs and the ones that look at the first word knew others. The wrappers are one table now, with the options of each that take a value (`flock -w 5`, `unshare --propagation private`, `strace --output f`, `systemd-run -M host`, `runuser -w HOME -u user`), and `taskset -c 0 cmd`, which has no mask before the command, is read as it is. A program that runs another after a verb (`direnv exec . cmd`, `mise exec -- cmd`, `asdf exec`, `uv run --with x cmd`, `conda run -n env cmd`, `bundle exec`, `volta run`, …) is read through, with its options. Stroq's own state commands were also missed behind the options of a package runner that take a value (`pnpm --filter pkg exec stroq untaint`, `npx --prefix /opt stroq untaint`, `yarn workspace pkg stroq untaint`, `npm exec -w pkg stroq …`, `pnpx stroq …`; an option that is not known is read as one that may have a value), behind `direnv exec . …` and `corepack yarn …`, and in the string of `nix-shell --run '…'`, `nix develop -c …`, `runuser -l user -c '…'` and `su --session-command '…'`. A line given to `tmux new-session -d '…'`, `tmux run-shell '…'`, `tmux send-keys '…' Enter`, `screen -dmS name …`, `screen -X stuff '…'`, `nodemon --exec '…'`, `concurrently '…' '…'`, `fd -x …`, `rg --pre '…'`, `osascript -e 'do shell script "…"'` and `capsh -- -c '…'` was an argument that nothing read; it is read as the line it is. `echo x &> ~/.bashrc`, `>&` and `&>>` write a startup file as `>` does, and so do zsh's `>!`, `>>!` and `>&!` and a descriptor the shell makes (`exec {fd}>~/.zshrc`); the check for it knew only `>` and `>>`. A command behind a leading redirect was not found by the readers of the first word where the target is a quoted word with a blank in it (`> "/tmp/my out.log" crontab -r`), a here-string of two words (`<<< 'x y' crontab -r`), `>|` or `{fd}>f`: each runs the command in bash and in zsh. Options that stand together in one word were read as one that takes no value, or as the command: `sudo -nu root stroq untaint`, `sudo -Eu root …`, `env -iu X …`, `doas -nu root …` and `runuser -mu user -- …` (the first option of the word that takes a value decides, and it takes the next word only if it ends the word: `-uroot` carries its value). A string glued to its option is read from the first letter that gives it: `su -c'crontab -r'`, `su -lc'…'`, `script -qc'…' file` and `tmux -c'…'` (read from the last `c` of the letters, `crontab` was `rontab` and `curl` was `url`), and so is the string of `flock -xc 'cmd' FILE`, `flock -c'cmd' FILE` and `flock FILE --command 'cmd'`. The shell of another user or group reads standard input as a program, as `sh` does: `su root <<< 'stroq untaint'`, `su - root`, `su -s /bin/sh root`, `runuser -l user`, `newgrp staff`, and the wrappers that start a shell when they are given no command (`unshare -m`, `nsenter -t 1 -m`, `chroot /x`), fed by a here-string or a pipe; the options of `su` that name a shell or a group (`-s csh`, `-scsh`, `--shell csh`, `-g staff`) are not words for that shell. A format string of tmux runs the command in its `#(…)` (`tmux set -g status-left '#(cmd)'`, `display-message`), `tmux display-popup -E 'cmd'` runs its argument, `screen -X at 0 stuff 'cmd\n'` types into a window, `osascript -l JavaScript -e '$.system("cmd")'` runs a shell, and a script that runs one with a line it does not write out (`do shell script x`, `app.doShellScript(cmd)`) is asked about as `eval "$x"` is; `entr -s` stands anywhere in its options (`-rs`, `-sd`). The options of those launchers that take a value were skipped by the last letter of their word, so a value glued to its option swallowed the command: `tmux new-session -d -sname 'cmd'`, `tmux new-window -nwin 'cmd'`, `tmux split-window -lsize 'cmd'`, `screen -dmSname cmd` and `tmux -2L name new-session -d 'cmd'` (a word of options whose last letter takes the next word) were allowed; the first letter of a word that takes a value decides now, as it does for `sudo -nu` and `su -scsh`, and `send-keys -c` and `run-shell -c` take one too. `fd -Hx cmd`, `fd -xcmd` and `fd --exec=cmd`, `osascript -e'…'`, `npx -yc '…'`, `npm exec -yc '…'`, `vim -esc '!…'` and `nodemon -x'…'` were read only as the exact words `-x`, `-e` and `-c`. A program that Stroq has no name for still hides what it runs from the readers that look at the first word of a stage; it is a known limit (SECURITY.md). - **A command that took longer to read than the host waits was read until the host gave up, and then allowed.** The estimate of what a command costs to read (`reading-cost.ts`) is made before it is read and is right for the shapes it was measured on; a soup of 16 KiB of every construct at once (`case x in`, `eval`, `noglob`, `for i (a b) {`, `function f {`, `${2:2:3}`, `<<'EOF'`, in a random order) took from six to eleven seconds on 0.22.0 as well, and a few thousand more characters of it take longer than fifteen. The reading has a clock now: eight seconds from when it begins, checked where a text is taken apart (a lexing, a splitting into words, a round of putting functions in place), and a reading that is past it stops and is asked about (`shell.unparsed`, signal `reading-took-too-long`), as a command that is estimated too costly is. It runs around the whole of reading a tool call, from the split of the command and the decoding of the programs it hands to shells (most of the work) to the last detector; first it ran around the last part only, and a command that spent its time in the first was not stopped. A single step that is slow in itself (one pattern that backtracks) is not interrupted by it, and is what the ReDoS gate holds to be linear: it times 285 shapes at three sizes now, among them every word that a reader looks for, repeated to 256 KiB (a sweep of 900 of them found `parallel ` at 22 seconds and `npx ` at 16, and a sweep of the forms of this release found `#(` repeated in a tmux format string at half a second for 47 KiB and growing with the square, all in code of this release that had not shipped). A second sweep, of every shell keyword and operator behind a `function` word (1,287 shapes), found what the first could not: a keyword inside a long word (`-do-do-do…`) began the header of a function at each of its occurrences, with a name that ran to the end of the word, and 160 KiB of it took thirty seconds with the clock silent (one pattern is not interrupted by it); a keyword has to be a word of its own now (64 KiB: 2.5 s to 30 ms). - **A message that names a protected file, and a read that sends its errors to `/dev/null`, were a write to it.** Any `>` in a segment that names `~/.claude/settings.json`, `.git/hooks/pre-commit` or `~/.stroq/policy.yaml` was a write to the file, so `cat ~/.claude/settings.json 2>/dev/null`, `echo "missing ~/.stroq/policy.yaml" >&2` and every helper function with one of them in its body (`die() { echo "error: $1" >&2; exit 1; }; die "cannot read .claude/settings.json"`) were denied, not asked about. A descriptor copied onto another (`2>&1`, `>&2`) and a write to `/dev/null`, `/dev/stderr`, `/dev/stdout` or a terminal write no file; any other `>` still does. A line of prose that began `at` or `batch` in a document that is text (`at 3 AM and removes temp files.` in a runbook written with `cat > runbook.md <<'EOF'`, in a commit message, in a string that spans lines) was a scheduled job; only a command that both ways of cutting a command agree on is. A document given to a filter or an interpreter (`sort`, `jq`, `python3`, `mail`, `base64`, `node`) is data or another language and holds no job, and a line is a job only when everything after `at` is a time, as `at` itself insists (`at noon we meet` and `at least three` are prose; `at 5pm tomorrow` and `at now + 1 hour` are jobs). `command -v at`, which looks the program up and runs nothing, was read as a job, and `command -v crontab` as a change of the crontab; `command -v` and `-V` describe, and `command -p at now` and `command -- at now` still run. A shell that is told to run `npm run watch`, `grep -c script` or `jest --watch` was read as if it ran what is piped into it as a program, because the words that hand a line to a shell (`watch`, `tmux`, `screen`, `script`, `sg`, `nix`, …) were also the words that make a shell read its input; they are two lists now. A `$'…'` string with `\t`, `\n` or `\x41` in it switched off the masking of every document that follows it (`echo $'a\tb' > data.tsv` before a README written with `cat <<'EOF'` that says `git reset --hard`); only `\'`, where the shells disagree about where the string ends, does. And a function with a `for` over two to six words in it, once called, was asked about from 570 characters (the copies that the loop makes were five functions of one name, each call was put in place as all five, and the room was spent): the copies are one function now, and the room is 256 KiB and forty-eight times the command. - **A name that the shell gives a value without it being spelled was taken for one the environment gave.** `curl … | { read; $REPLY; }`, `read < <(curl …); $REPLY`, `mapfile; $MAPFILE` and `: "$(curl …)"; $_` ran what the fetch printed and were allowed, because a command word that a variable names is exempt where the command never makes the variable, and `read` with no name makes `REPLY`. `_`, `REPLY`, `MAPFILE` and `OPTARG` are never taken for a name that the command did not make. - **A listed name written as a shell reads it, not as it is typed, was not listed.** `export $'\x50ATH'=…; curl … | head` sets `PATH`, and the pattern that finds a name that changes what a command means looked at the text with the quotes taken off and the escapes left in. Words are read as a shell reads them (`$'\x50ATH'`, `$'PA\x54H'`, `$'\120ATH'`). ### Changed - **`curl … | python3 -c "…"` is read, and a pipe into an interpreter is denied only when the interpreter takes it for its program.** Before, any Python or Node after a fetch was `deny-encoded-exec`: 206 of the 19,862 distinct commands of a real Claude Code and Codex history (1.04%), 169 of them reading the answer of an API with `python3 -c "import json,sys; …"`, `node -e` or `python3 -m json.tool`, which look to a pattern like `curl … | python3` and are not it. The command line is read now. An interpreter with no program of its own (`python3`, `python3 -`, `node -`, a script, `-m` of anything but `json.tool`, `-r`, `--require`), or with a program the shell makes (`-c "$(cat)"`), takes what is piped in for its program and is denied as before, and so does a stage that cannot be read (`xargs python3`); `python3 -m json.tool` with its own options (`--indent N`, `--sort-keys`, …) and no file only reads. An inline Python program is read as Python reads it, against a short list of names that cannot run code, start a process, touch a file or open a socket (`json`, `sys`, `re`, `datetime`, `collections`, `itertools`, `csv`, `hashlib`, `urllib.parse`, the builtins that run nothing, and the methods of strings, lists, dicts and sets). A program that names only those reads, and is not stopped; one that names `exec`, `eval`, `compile`, `__import__`, `os.system`, `subprocess` or the like runs code, and is denied; one that names anything else (`os`, `open`, `socket`, a name nobody defined, a spelling it cannot read) is asked about (`shell.unparsed`, `ask-shell-unparsed`), and so is an inline Node program unless it names `eval`, `Function`, `child_process`, `vm` or `import()`, which is denied. Where the lexer is not sure of a text, an interpreter after a fetch is denied as it always was. The list is checked against Python itself: `inline-python-oracle.test.ts` runs every program read as data (and 1,600 made from listed and unlisted parts) under an audit hook that refuses any event that runs code, starts a process, touches a file or opens a socket, and walks every attribute name the list allows from every module and value a program can make, which must reach nothing that runs code; `pipe-consumer-differential.test.ts` pipes a program printed by a stub `curl` into 175 ways of starting Python, Node, the shells, awk, make, m4, ed, ex, Tcl, expect, sqlite3, vim, irb, `script` and the wrappers that start them, and wherever the real program ran it the command was denied or asked about. Of the 169 commands of the history that lost the denial, 135 are not stopped by this rule and 34 are asked about (33 an inline Node program, the rest a Python program that opens a file or reads the environment). Python's `-i` and node's `-i` or `--interactive` start a prompt that reads what is piped in as a program whatever `-c` or `-e` ran first (`python3 -i -c 'print(1)'`, `PYTHONINSPECT=1 python3 -c …`, `node -e 1 -i`), and node reads its own options wherever they stand (`-r`, `--require`, `--import` after the program are node's, not the program's), so those are denied as `python3 -` is. The line and script processors that run what they read as commands in some forms are read the same way: `awk -f -` and an awk program that calls `system(`, `| getline` or a pipe to a command, `sed -f -` and a sed script with GNU sed's `e` command or flag (`s/x/y/e`), `make -f -`, `m4`, `ed`, `ex`, `at`, `batch` and `parallel` with no command, and the interpreters `expect`, `tclsh`, `wish`, `groovy`, `jshell`, `scala`, `swift`, `dart`, `elixir`, `escript`, `racket`, `guile`, `ghci`, `runghc` and `crystal`; a fetch piped into one of these forms is denied, and their other forms (`awk '{print $1}'`, `sed 's/a/b/'`, `make -j4`) only read it, as they always did. Not read: an inline program of Perl, Ruby or PHP, and Node programs, which stay a stop. - **The name of a network library at the end of a longer name is not the library.** `python3 -c "…" "select count(*) from organization_join_requests" | curl -s -X POST "$URL" --data @-` was asked about as a fetch piped into an unknown program, because `requests` in the text of the command read as the library of that name; it is not read at the end of a snake-case name now (`pull_requests`, `web_socket_path`), and `import requests`, `urllib`, `socket` and `fetch(` still are, as is a name that begins with an underscore (`_socket`, `_http.request`). - **A fetch or a decode piped into a command that is not known to only read is asked about, not allowed.** The pipe detectors named the programs that run their input (`sh`, `python3`, `node`, `perl`, …), and a stage that was not on that list was allowed. A second review found five that were not on it in half an hour and ran a fetched line, each answered `allow` (`curl … | sqlite3` with a `.shell` line, `| vim -es`, `| irb`, `| script -q /dev/null sh`, `| awk '{print | c}'`), and every program anyone added would be a sixth. The list that can be finished is the other one: what only reads. In the 642 pipelines of one Claude Code and Codex history in which a fetch or a decode is followed by another stage, the stages are `tail`, `head`, `grep`, `jq`, `sort`, `sed`, `cut`, `uniq`, `tee`, `tr`, `column`, `wc` and `echo`, and a Python or a Node. So what a fetch or a decode may be piped into without a question is a short list (`packages/core/src/actions/data-consumers.ts`: filters and counters, JSON, HTML and XML readers, encoders, sums and decompressors, `tar`, `diff`, `docker load`, the clipboard), called by its name or by a path the system owns, through any wrapper that runs it plainly. `./head`, `/tmp/head`, `HEAD` and a function that the command defines under the name (`head() { sh; }`) are not it, and neither is a reader that is told to run a program (`tar --to-command=sh`, `sort --compress-program=sh`, `split --filter=sh`, `bat --pager sh`, `rg --pre sh`, `xmllint --shell`). A language that reads its input as its program (`irb`, `pry`, `ipython`, `R`, `octave`, `gdb`, `lldb`, `lua`, `ghci`, …) is denied as `python3` is. An `ssh` hands its input to the command it runs on the other machine, which is read in turn (`ssh host 'docker load'` reads, `ssh host sqlite3` is a question, and `ssh host` with no command is the login shell and is denied). Anything else (a database client, an editor, `kubectl apply -f -`, `docker run -i`, a program by its path, a command word that a variable makes) is `shell.unparsed`, asked about, with the signal `fetch-into-unknown-program` or `decode-into-unknown-program`. Of the 19,622 distinct commands of that history none is newly asked about. The decoder has to be the command, not text that says so (`echo '… base64 -d …' | npx stroq hook` is not a decode). - **Five ways round the interpreter list were closed with it.** awk's `print | c` and `print | ("s" "h")` run a fetched line as a command, as `print | "sh"` does, and the check only knew the form with a string: an awk program is read by a tokenizer now, and any `|` that is not `||` and not inside a string, a regular expression or a comment is an output or an input pipe (`|&` and `system(` run a command too), where a `/` after an operand is a division and not the start of a regular expression that would hide the pipe; gawk's `-e`, `--source`, `-E`, `--exec`, `-i`, `--include` and `-f` can take a program from the input. A sed script is read from every `-e`, `--expression` and attached `-es/x/y/e`, and, because BSD sed's `-i ''` takes a word, from every operand. A command word hidden behind the option of a wrapper was not found (`caffeinate -t 5 bash`, `env -P /bin bash`, `doas -C … bash`, `nice --adjustment 5 bash` ran a fetched shell and were allowed: the number or the path after the option was taken for the command); the tables of options that take a value are complete for `sudo`, `doas`, `env`, `nice`, `timeout`, `time`, `xargs`, `stdbuf`, `ionice`, `caffeinate`, `watch` and `parallel`, and `-e`, `-o`, `-u` and `-g`, which are flags for most of them, no longer take the word after them. A shell with a version or an `r` in its name (`bash5`, `bash-5.2`, `zsh-5.9`, `rksh`) is that shell. `PYTHONINSPECT` and `PYTHONSTARTUP` for Python and `NODE_OPTIONS` for Node, set anywhere in the command (`export PYTHONINSPECT=1; curl … | python3 -c …`, `env "PYTHON""INSPECT=1" …`, `NODE_OPTIONS=--require=/dev/stdin node -e 1`), make the interpreter read its input as a program. And where the lexer is not sure of the command, a line processor is a program as Python and Node were, and a command that is not known to read is asked about: appending `; cat </` as that field alone, so that a page that quotes an attack as an example does not take down the rules on `content` that are right to match it), and it matches at least one of its own documented true positives through the field. Eight rules failed the first (`ATR-2026-00061`, `-00010`, `-00083`, `-00095`, `-00065`, `-00011`, `-00395`, `-00096`; the first fired on 40 real results) and eleven the second (`-00268`, `-00269`, `-00274`, `-00257`, `-00264`, `-00397`, `-00400`, `-00062`, `-00260`, `-00262`, `-00105`: none matched any example of its own, and one has none), and are disabled with the reason in `rules/atr-disabled.json`: 28 disabled, 621 active. 450 of the 621 can fire on what Stroq reads (304 on the text, 146 on a response or a description); 171 wait for what a person typed, the arguments of a call or a trace, and `stroq doctor` says both numbers. - **A document, a commit message or a pull request body written with a quoted here-document is text.** `cat > RUNBOOK.md <<'EOF'` with `rm -rf ~` in it, a commit message from standard input that says `curl | sh`, and a note that says `eval "$(ssh-agent -s)"` were read line by line as the commands they name: the first two asked about, the third denied. The body is left out of what the detectors read when the delimiter is quoted (a body that expands runs its `$(…)` and is read as before), every command in the line is plain file work (`git`, `gh`, `cat`, `tee`, `cd`, `ls`, `mkdir`, `cp`, `mv`, `rm`, `echo`, `printf`, `head`, `tail`, `wc`, `grep`, and the shell's own loops and tests, in every text nested in it), the lexer was sure of all of it, and the document goes to standard output or to a file whose name says text (`.md`, `.txt`, `.rst`, `.adoc`, `.csv`, `.tsv`, `.log`, `.html`) and does not begin with a shebang. Each command is called by its bare name: `./cat`, `bin/cat`, `/tmp/cat` and `CAT` are files an agent may have written (`cp /bin/sh ./cat && ./cat <<'EOF'` is a shell), not `cat`. No variable that changes what runs stands in the line (`PATH`, `IFS`, `ENV`, `BASH_ENV`, `LD_PRELOAD`, `DYLD_*`, `GIT_*`, `GH_*`, `EDITOR`, `VISUAL`, `PAGER`: `PATH=./bin cat` runs a file, `GIT_EDITOR='sh -s' git commit` an editor that reads what is piped in). `git` and `gh` stand only with the subcommands a message goes with (not `git apply`, `am`, `fast-import` or `config`, which make files or name commands, and not `gh alias` or `gh extension`), and are given input only where they are told to read it as data (`git commit -F -`, `gh pr create --body-file -`): a plain `git commit` with a here-document, or one that something is piped into, starts an editor that may be `sh -s`. `cp` and `mv` stand only with text files and directories (`cp notes.md run.sh` makes a script), and every file any command in the line writes is a text file, not just the one that holds the document (`printf … > run.sh` is not). Not text any longer: `.patch` and `.diff` (`git apply` and `patch` make files from them), `sort` (`--compress-program` runs a command) and `rg` (`--pre`), which a first version took for it. Where a body ends is what a shell says: a delimiter is read as one reads it (a backslash and a line break is a continuation and does not quote it; `$'EOF'` and `$"EOF"` are read only without an escape in them; a backslash inside double quotes is not guessed at), and a body is left out only when its delimiter is plain (`'EOF'`, `"EOF"`, `\EOF`, of letters, digits, `_`, `.` and `-`). A review ended a body at `< hook claude-code` before and after every tool call: 1.0 to 1.6 s a call on a busy machine (six calls; 1.7 to 8 s on a slow network), most of it a request to the registry, and a registry that did not answer blocked the call. It now installs the pin into `~/.stroq/plugin-cli/` the first time (`npm install --ignore-scripts` into a staging directory of its own, run from the scratch directory, checked to be the pinned version and to hold the file that starts it, then moved into place in one step, so a hook that starts while another is installing sees a whole copy or none) and runs `node` on it, from the copy's own directory and not the project's: 0.30 to 0.35 s a call (six calls, the same machine). The first call, which downloads it, took 9.5 s, inside the 11-second deadline that now covers the install and `npx` together. The copy is under `~/.stroq`, not in a folder of the plugin or of Claude Code, because the self-tamper gate refuses writes that name that path (a check on the path as written: a bar, not a guarantee). `npx` is still what runs when the install fails (no network, the pinned version not on npm yet, in which case it goes straight to the newest release, a copy that could not be put in place), a global `stroq` still comes first, a stroq that starts and fails is not retried another way, and `STROQ_PLUGIN_NO_LOCAL_COPY=1` keeps the old path. However stroq is started it now runs under a deadline of 13 s from the start of the wrapper (the 11 s of the way to it and two more): a stroq that hangs, as the published 0.22.0 does on a FIFO named like a script, was ended with the `npx` that started it, and run on the copy it would have run into the host's own 15-second timeout, which lifts the hook and lets the call through; it is ended now, and a PreToolUse blocks. Something that is not a copy where the copy goes (an empty directory, a link) is moved out of the way, a link where the copies are kept is not installed through, the home is made for its owner alone, a deadline that is not a plain number is the default, and when a newer copy is installed those of earlier versions that are more than a day old are removed. Checked with the real npm and the published 0.22.0 under bash 3.2 and 5.2, from a home with a space in its path, and under a folder above whose `.npmrc` names another registry and whose `node_modules` holds a planted `@stroq/cli`. - **`stroq attack` replays 36 scenarios: 26 from public reports and 10 synthetic cells; 17 blocked, 19 asked, 0 passed through.** The new one is a synthetic cell for the script fix above: a session that read a hostile README writes an upload script and runs it, and is blocked on the network deny; it fails without the fix. The summary line no longer says "every attack was stopped": 19 of them are asks, and it now says each was blocked or put to the user. The header says "from public reports", not "recorded incidents": the events are written from the reports. - **Six scenarios are marked "Modelled on".** 01, 03, 05, 06, 07 and 11 replay a different final action from the one the cited report describes (07 cites a CVE that runs before any tool call, 05 a VS Code `$schema` fetch while the replay is the agent's own WebFetch). Three dates were wrong against the sources (05 and 09 are 2026-02, 06 is 2026-04), and scenario 28 cited CVE-2026-10591 for an `mcp.json` write that the AWS bulletin and NVD describe with `.vscode/tasks.json`; it now cites Intezer's variant of the same class. - **The coverage mapping is against MITRE ATLAS 2026.09.** Eleven techniques are new (208, up from 197): three are in scope with their limits stated, eight out. They were placed by one reader and not reviewed by a second; `packages/cli/src/coverage/SCOPE.md` says so. - The demo scripts for Codex, Copilot and OpenClaw say their events are hand-written, which `docs/AGENTS.md` already said of the wire format; `CONTRIBUTING.md` names the real coverage thresholds. - The test suite keeps its temporary files in one directory of its own and removes it when the run ends. Before, every file made a fake home and every case a project, none was removed, and a developer's temporary directory held 60,000 of them (870 MiB) after a few weeks of runs, enough for a full disk to fail unrelated tests. ### Measured Against 20,580 distinct shell commands from this machine's Claude Code and Codex transcripts (this work's own session left out), compared with 0.22.0, 357 changed class. 99 gained one. 56 gained `shell.unparsed`: 35 are a fetch piped into an inline Python or Node program, which is asked about where 0.22.0 denied it, 3 a fetch piped into a program Stroq has no name for, 9 a shell handed a program that could not be read (a `sh -c "$T/t.sh"`, an `eval "$2"` in a function, a command whose quotes never close: `bash -n` refuses it too), 5 a line of prose in a here-document that begins with a command substitution, in a command that is not only file work (so its lines are read as commands, as they were), 3 a script that the command runs, found now, that fetches with a command made at run time or deletes on another machine over `ssh`, and 1 a `curl … | sh` in a group. 24 gained `fs.secrets` (a script the command runs, which is found now, reads a credential path, or a variable names one), 6 `shell.destructive` (4 a `find ~/Library/… -exec rm -rf {} +`, a delete 0.22.0 did not see; 2 a script that runs `rm -rf` on another machine over `ssh`), 8 `shell.network` (a subshell, a group or a variable that runs `nc`, `curl` or `ssh`; the scripts and the installer above), 9 `config.instructions` (a write through a variable to a memory or notes file), 3 `config.self_touch` (a read of a protected file whose errors go to `/dev/null`, which 0.22.0 denied as a write and asks about now), and 1 `shell.exec_encoded`: a `curl … | sh` in a group, an installer that 0.22.0 allowed. 258 lost a class and gained none: 132 of them `shell.exec_encoded` (a `curl` piped into `python3 -m json.tool` or an inline Python program that only reads it, which `deny-encoded-exec` denied and does not now; text that mentions `curl … | sh`, in a here-document or a quoted message), 34 `config.self` (a message that names a protected file or a Stroq command, a read of a protected file whose errors go to `/dev/null`: the fixes above), and the rest because the words that raised the class were text and not a command (a here-document, a quoted message, a `|` inside a quoted pattern, a word such as `spynex-eval`). Reading costs more: 1.7 ms of CPU for a command on average (0.22.0: 0.7 ms) against a hook that takes 100 to 250 ms to start, and the slowest of them took 115 ms (0.22.0: 126 ms). Everything that was changed after the ninth review began (the wrappers and launchers, options that stand together, strings glued to their options, the shells of other users, the clock around the whole reading of a tool call, the scan for definitions of functions) changed the class of none of these commands, and of 336 shell scripts on this machine none; the fixes of a fifth review (here-document lines, printers, parameters as programs, `git`) had changed none of the 20,011 commands then in the history. ## [0.22.0] - 2026-10-01 ### Added - **A new action class, `config.persistence`, for writes that install something a trusted process runs later.** A shell's startup files (`~/.zshrc`, `~/.zshenv`, `~/.bashrc`, `~/.bash_aliases`, `~/.profile`, fish's `config.fish`, `conf.d` and `functions`, `/etc/profile` and siblings, PowerShell's profile including `$PROFILE`), SSH's `authorized_keys`, `rc` and `environment`, macOS `LaunchAgents` and `LaunchDaemons`, user-level systemd units, `environment.d`, XDG autostart, the Windows Startup folder, an editor task that runs when the folder is opened (`"runOn": "folderOpen"` in `tasks.json` or a `.code-workspace`, `task.allowAutomaticTasks`), and the ways to schedule a job (`crontab`, `schtasks /create`, `launchctl submit`, a `systemd-run` timer, `reg add …\Run`, `Register-ScheduledTask`). The default policy asks in any session (`ask-persistence`) and denies in a session that has read something suspect (`deny-persistence-when-tainted`). Nineteen action classes are now named in the policy. A read of the same files is ordinary: only a redirect into the file, a verb that puts text in it (`tee`, `patch`, `sed -i`, `perl -pi`, `cp`/`mv`/`install` onto it, `dd of=`, `defaults write`, `PlistBuddy`, `git clone`, `git … --output`, `tar -C`, `unzip -d`), a download written to it, or an inline interpreter whose code writes counts; `chmod`, `touch` and `rm` do not. A relative name is joined to the process's working directory and to an earlier `cd` (a `cd` inside parentheses is undone when the subshell closes), and `~/.{a,b}` is expanded. `~/.ssh/config` counts only when what is written names a directive that runs a program (`ProxyCommand`, `LocalCommand`, `KnownHostsCommand`, `Match … exec`). - **Writes through a symlink are judged by where they land.** A project file that is a link to `~/.ssh/authorized_keys` (Wiz GhostApproval) was classified by its name. The path of `Write`, `Edit`, `Read` and of an MCP tool's path arguments (read or written, up to 64 per call; past that the call is asked about) is now resolved on disk, through a link at the end, a link in any directory above, a dangling chain, and a directory that does not exist yet under a linked one, and the real target is classified as well, with the signal `via-symlink`. - **The text of a write is read, not only its path, and each string a write carries is read on its own.** Git configuration text in a file named like one (a gitdir's `config`, a `.gitconfig` or anything named like it, `.cfg`/`.conf`/`.ini`/`.inc`), in two tiers: a key git runs on every operation (`core.fsmonitor`, `core.hooksPath`, `diff.external`, a `filter` driver other than Git LFS's own, a `merge` driver) is `config.git_exec`, which closes the `gitdir:` alternate-config shape of GitPwned, also when `git show --output` writes it; a key that names a program for one feature (`gpg.program`, a `textconv`, `include.path`, a shell alias or pager, a credential helper starting with `!`) is `config.persistence`, asked rather than refused, because a user's own `~/.gitconfig` has them. An MCP server list that registers a shell or an inline interpreter as a server (`sh`, `bash -c`, `env bash`, `npx -c`, `python3.12 -c`, `node --eval`, `deno eval`, or a wrapper that sources anything but the user's shell setup before a package runner; a server's own options after its script are left alone) and an agent definition, skill or command whose frontmatter has `hooks:` are `config.instructions_payload`; an SSH client configuration that runs a program is `config.persistence`. A text past 4 MiB in one of those files is asked about, not passed. The same texts are read when a Bash command writes the file (a heredoc, or a quoted string given to `echo` or `printf`). - **A script a command runs is judged by what it contains.** `bash helper.sh`, `source x.sh`, `./clean.sh`, `./cleanup` with a shell `#!` line, `bash < x.sh`, `$PWD/x.sh`, a script run after a `cd`, `& .\clean.ps1`, `pwsh -File`, `cmd /c wipe.bat`: the file is read when the command runs, and what it does that is destructive, encoded or persistent is added to the command. Variables are resolved in order, and a line is also read with every other value its variables take in the file, so neither a reassignment after the use nor a function defined before the assignment hides `rm -rf "$HOME"`. Two 2026 reports are exactly this (claude-code #88462, #87360). Only shell-family scripts are read, one level deep; `eval "$(tool init)"` is not counted, because it is how `nvm.sh` and `~/.zshrc` set themselves up (of 128 scripts on one machine, 14 raised it), while `eval "$(curl …)"` is; the text of a heredoc that only prints, or that writes a file the script never runs (a Dockerfile, a README), is skipped; and a script past 1 MiB or 20,000 lines, or a command that runs more than eight scripts, is `shell.unparsed` instead of passing silently. Only files that are shell scripts count toward that limit, so a `git add \` list or a heredoc of paths is not asked about. - **`trap` bodies and `cmd /c "…"` / `powershell -Command "…"` strings are read as commands**, including `trap -- '…'`, a double-quoted trap with `\"` and `\$` inside, and a `cmd` body that ends in a backslash before its closing quote. - **A command sent over `ssh` is read as the command it carries**, in the quotes it was given in, behind combined options (`-tp 22`), quoted option values, `--` and `sshpass`: `ssh prod docker rmi ` (claude-code #94579), `docker volume rm`, `docker compose down -v`, a recursive `rm` outside `/tmp` (`..` collapsed, an earlier `cd` followed), and a decode-and-run pipeline are asked about; `docker ps`, `docker stop`, `rm -f` and `rm -rf /tmp/…`, quoted or not, are not. A command left unread for want of room is `shell.unparsed`. - **Deletes on hosting, storage and clusters are `shell.destructive`,** with global options allowed before the verb (`kubectl -n prod delete`, `aws --profile p s3 rm`, `gcloud --project=p … delete`): `firebase hosting:disable` and the other `firebase` deletes, `gcloud … delete`, `gsutil rm|rb`, `aws s3 rm|rb|sync --delete`, `aws delete-|terminate-|deregister-|remove-…`, `az … delete`, `kubectl delete` of namespaces, volumes, deployments, nodes or `--all`, `heroku`, `netlify`, `vercel`, `helm`, `fly`, `docker volume rm|prune` and `docker system prune --volumes`, `gh api -X DELETE`, `npm unpublish`, `gh release delete`, `lftp … --delete`, `rsync --del` / `--delete*` to a remote host, and `git filter-branch|filter-repo|reflog expire|gc --prune=now`. - **`stroq attack` replays 35 scenarios, up from 21: 26 documented incidents and 9 synthetic cells; 16 blocked, 19 asked, 0 passed through.** The fourteen new ones are GitPwned, the git-worktree `~/.zshenv` escape (CVE-2026-55607), GhostApproval, the `trap` that removes `$HOME`, the agent-written `git clean -xdff` script, the Antigravity `.vscode` time bomb, the Kiro MCP server (CVE-2026-10591), the memtry onboarding harvest, Clinejection, the `ssh` image removal, the Firebase hosting disable, the `lftp mirror --delete`, the `rmdir` that collapsed to a drive root and the reset and force-push on a branch with an open PR. A scenario can now carry `links` (symlinks created in the throwaway directories) and script fixtures. `--fuzz` crosses the 19 that carry untrusted text with all 25 mutations: 475 variants, 0 escapes. The report headers now say what was run: documented incidents and synthetic cells are counted apart, and the fuzz header multiplies only the scenarios it mutated. - **A new rule, `STROQ-2026-00013`, for an instruction to sweep home and agent-config directories and submit what is found.** It names two agent or credential directories under the home directory (`~/.claude`, `~/.ssh`, `~/.aws`, …) between a collecting verb and a sending one, with gaps that cross line breaks. It closes the one `--fuzz` escape that was left: the memtry-cli onboarding text (OSV MAL-2026-10736) split across lines, which no other rule read. A backup guide that names `~/Documents` and `~/Desktop` does not trigger it. The bench false-positive rate is unchanged at 18/121 (14.9%). ### Fixed - **A pipeline of many commands took time quadratic in its length.** For each stage the classifier copied and searched everything after it for a shell: 256 KiB of `x | x | …` took 1.3 s, and a hook has no length cap on what it is handed. It is one pass now (0.2 s). - **`prisma db push --accept-data-loss=false` was a destructive command.** The flag that declines data loss matched the one that accepts it. - **A command word named like an object property (`toString`, `__proto__`) threw in the classifier.** The table of network subcommands is read by its own keys only. ### Changed - **`.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json`, `.roo/mcp.json`, `.kiro/settings/mcp.json` and `.gemini/settings.json` are instruction files.** A write is asked about in a tainted session, or in any session when the text registers a shell or an inline interpreter as the server (Kiro, CVE-2026-10591). Adding an ordinary `npx` server is still ordinary work. The agent definitions under `.github/agents`, `.github/prompts`, `.github/chatmodes`, `.kiro/steering`, `.kiro/hooks` and `.agent/` / `.agents/` (`rules`, `workflows`, `skills`) join the list. - **The new detectors read a command cut where the shell cuts it.** The quote-blind cut at every `|`, `;` and `&&` turned `grep -E "a|crontab|b"` into a `crontab` command and took the file from `perl -pi -e 's/a|b/'` `~/.zshrc`; persistence, scripts and the text of Bash writes now read the command split outside quotes, with heredoc bodies cut by line as before. ### Measured Against 84,434 real tool calls from this machine's Claude Code and Codex transcripts, compared with 0.21.2, 42 decisions changed. Outside Stroq's own development, 6 did, all from allow to ask: two `git filter-branch` runs, three recursive deletes over `ssh`, and a heredoc that writes a script with a delete in it; none to deny. The 4 new denies are all probes written while building this release: two write git configuration that sets `core.fsmonitor`, one is a Python edit whose text names `.git/config`, and one writes test fixtures that name Stroq's own settings. ### Not covered (stated, not implied) A Python or Node script (only shell-family scripts are read), what a script computes at run time, `cat x.sh | bash`, a script that does not exist yet or changes after it was read, a file copied into place by a later command, a symlink made or followed inside a Bash command, an npm lifecycle script run by `npm install`, a virtualenv interpreter swapped for another, `docker run --privileged` and socket escapes, `sudo systemsetup -setremotelogin on`, an `ssh` remote command written with `$'…'` or split across words, a git configuration written to a file not named like one and pulled in by an `include.path` set some other way, and a tool call forged inside a model response. ## [0.21.2] - 2026-09-30 ### Security - **What a failed tool printed was never scanned.** Claude Code reports a tool that failed — a `Bash` command that exits non-zero, a failing MCP call — through its own event, `PostToolUseFailure`, with the output in `error`; a failed command produces no `PostToolUse` at all. Stroq subscribed only to `PostToolUse`, so text a failing `curl`, test run or MCP call printed, which a hostile page or package can choose, never reached the scan, the taint or provenance. Checked end to end on a real Claude Code 2.1.271: a command that failed after printing an injected line to stderr left no trace in the audit before, and is now `post Bash suspect(1.00)`. `init` and the plugin install the event with the same matcher as `PostToolUse`, the adapter answers in the failure event's own output shape (`additionalContext` only), and an install without it is incomplete: until you run `stroq init` again, `stroq doctor` says so, `stroq run` refuses to start the agent (`--force` starts it anyway), and `stroq exposure` reports the agent as unprotected (critical, exit 1). A plugin install gets the event with `/plugin update stroq`, which `doctor` cannot see. - **Files the host loads into every session were not on the instruction-file list.** `CLAUDE.local.md`, `AGENTS.override.md`, `.claude/rules/`, `.claude/output-styles/`, `.github/instructions/`, `.claude/scheduled_tasks.json`, `.claude/loop.md`, `.claude/agent-memory/` (and `-local`), `.claude/routines/` and `.claude/workflows/` are files Claude Code, Codex and Copilot read into a session or run from (each is a path Claude Code 2.1.271 itself refers to), so a session that read something hostile could save an instruction into one and have every later session load it, with none of the `config.instructions` handling a write to `CLAUDE.md` gets. They are covered now: a write is asked about in a tainted session, its own text is scanned, reading one scans it as an instruction file (reading `copilot-instructions.md` too), and `stroq exposure` scans the text ones (rules, output styles, instructions, the loop prompt, scheduled tasks, subagent memory) and its drift list notices when one changes. `exposure` also no longer follows a directory symlink twice: two links pointing back at their own folder, which a repository can commit, made it walk the same tree until it never came back; and it reads at most 2,000 directories per walk under a repository (a link to `/System` took 92 s before the file cap was reached) and 20,000 under your own home directory, so a repository's budget is separate from the one your own plugin skills get, skipping `node_modules` and `.git`, and reports the counts as a lower bound when it stops. A write that names the directory in one part of a command and the file in another (`cd .claude/rules && echo x > style.md`) is still not recognised for the entries that are directories; the guide says so. - **An MCP call's path was read only for tools and keys on a short list.** A tool called `copy_file`, `str_replace`, `touch` or `chmod` was not "write-shaped", so a copy into `.claude/settings.json` or `CLAUDE.local.md` was not `config.self` or `config.instructions`; a tool called `get_file_contents` or `open_document` reading `~/.ssh/id_ed25519` was not `fs.secrets`, because the path was looked for only when the name matched `read`, `view`, `search`, `grep`, `list` or `cat`; and a path under `source_path`, `relativePath`, `outputDir`, `file_name`, `path2` or `options.path` was not found at all. What is read now: the tool name as words (`copy_file`, `modifyFile`, `FSCopy`, `take_screenshot`); in every MCP call, a path under any key ending in path, file, dir or folder (not `profile`) or one of `src`, `source`, `from`, `to`, `dst`, `output`, `target`, `save_as`, `uri`, `url` and a few more, at any depth (an options bag, a list of targets, an object under such a key), and in the native `Grep`, under its own keys (`path`, `file_path`, `notebook_path`, `directory`, `root`, `files`, `paths`). Values under those keys are read in full, because `./` padding is resolved away by the server and the protected part of a path can be its tail; identical values are read once. A key that names a destination (`dst`, `output`, `save_as`, `new_name`, `write_to`) makes its value a write target whatever the tool is called. A `file:` URI is read every way a server can read it (as a URL parser does, and with `file://` cut off the front), so `file://.claude/settings.json` and ` file:///p/%2Eclaude/settings.json` are both caught; an `http(s)` link is not a file, judged after `..` is resolved. A value with line breaks under a short key that is sometimes prose (`source`, `to`, `output`) is read a line at a time, so a break cannot hide a path. More than 4,096 distinct values under those keys, 2 MiB of them, or such a key longer than 256 characters, makes the call one Stroq could not read, and the policy asks (`shell.unparsed`), instead of cutting the scan off where the agent can fill the limit with decoys. The walk has no depth limit and no recursion, so a nesting the agent chooses can neither hide a path nor overflow the stack. A string under any other key (`attachments`, `document`, `image`, `input`, `privateKey`, an object key) is also read as a possible credential when it looks like a path (one line, at most 1,024 characters, a separator, no glob or selector characters, not a link), as a read only, best effort, with a budget of its own that can never displace the named keys. A key that carries prose (`body`, `text`, `comment`) is still not a path. The verbs that take a path as input (`add`, `set`, `apply`, `link`, `import`, `sync`, `generate`, `make`, `checkout`) are not writes, so a review comment on `.claude/settings.json` or `git_add` of it is not denied as tampering, and `create` is a write only beside a noun that says what (`create_directory`, `create_note`). Example env files (`.env.example`, `.env.sample`, `.env.template`, `.env.dist`) are no longer credential files, as the secret index already decided. - **`stroq exposure --probe` started a cloned repository's MCP servers with your whole environment.** The command in a `.mcp.json` that arrived with a repository was run with every variable your shell held: cloud keys, API tokens, the session. The probe now gives a server what `stroq mcp` gives a wrapped one: the variables a program needs to start (`PATH`, `HOME`, proxy, locale) and the `env` its own config declares. It is still a program that runs as you, with your `HOME`, so the guide now says to probe servers you would run anyway, not a repository you have not read. - **The provenance record kept a known secret a tool result had echoed.** Each atom Stroq remembers from a tool result (a URL, a package name) is stored with an excerpt to show you later, and the excerpt was scrubbed by pattern but not against the secret values Stroq knows: a page or an error message that put a credential in a URL left a copy of it in `~/.stroq`. The excerpt is now checked against the secret index the way an audit summary is, and in every spelling an atom can hold it in: the result as written and its base64, hex and percent-decoded layers (the last decoded leniently, so a stray `50%` beside the escapes does not hide them); lowercased, without trailing punctuation, and with compatibility characters and look-alike letters folded; percent-encoded in whichever characters the writer chose; and inside a hex or base64 blob glued into a URL. It is done in one pass per atom, so a marker is never rescanned and corrupted; a result that has more than 512 distinct spellings of known values, or more than 2,000 runs that could be encoded blobs, has its excerpts withheld, and so does a failing index; and an `encoded` atom that is a piece of a known value (the part of `sk_live_…` after its underscore) is replaced whole. Audit summaries also decode percent-escapes leniently now, and keep the decoded text, redacted, when a value was spelled with them. A value that contains a delimiter (`/`, `?`, `#`, `&`, …) and sits glued to other text, such as inside a URL path, is still not found, here or in an audit summary; the guide now says so. - **The plugin ran `npx` from the project, so a repository's `.npmrc` chose the code that acts as its firewall.** npm reads a `.npmrc` from the directory it runs in, and one that came with a cloned repository can name the registry the package is downloaded from. `npx` now runs from a fresh directory with a `package.json` of its own (npm walks up to the nearest one to find the project, so an empty directory inside one that has a hostile `.npmrc` would inherit it) and with `--no-workspaces` (a folder above that lists the directory as a workspace made npm run a `stroq` planted in its own `node_modules`, which then answered as the firewall); both checked with the real npm. npm also puts the `node_modules/.bin` of every folder above where it runs on `PATH`, and the installed `stroq` starts with `#!/usr/bin/env node`, so a `node` planted in a folder above the scratch directory answered as the firewall (in `/tmp`, where `mktemp` puts it on Linux, any other user of the machine can plant one): the scratch directory is now made under Stroq's own home (`~/.stroq/plugin-tmp`), whose ancestors are yours. A `node_modules/.bin` in your own home directory or above it would still be on that `PATH`; running the CLI without `npx` is on the list for 0.22.0, Stroq takes the project's directory from the hook event, and if that directory cannot be made a `PreToolUse` is blocked rather than run from the project. ### Changed - **`Grep` is in the `PreToolUse` matcher.** The classifier judges a `Grep` over a path (a credential file, a decoy) but the matcher did not name it, so on hosts that have the tool the call never reached it. Claude Code 2.1.271 no longer has a `Grep` tool — it searches through `Bash`, which was already covered, and a `grep` of a decoy through a real 2.1.271 is denied as `deny-canary-file` — so this matters for older Claude Code and the Agent SDK. A test now requires the matcher to name every tool the classifier has a rule for. ### Fixed - **`stroq sent --last` compared a session with the wrong folder's `.env`.** The index of project secrets was built from the folder the command was typed in, before the session was read, so run one level below the folder the agent was started in (or above it) it matched nothing and printed a clean verdict about a session that had carried the value. It now reads the `.env` files of the folder the session ran in as well as those of the folder you are in, in a private copy of the index that is deleted afterwards (the live guard's `~/.stroq/secrets.json` is still refreshed for the folder you run the command in, as before, but not rebuilt for the session's folder), and the coverage section names both folders. `--last` also picks the session better: a session recorded in a folder above the one you are in is that project's (for Claude Code and Codex; the nearest folder wins, across agents, whatever the times say, and neither the search for a folder above nor the check that a session belongs to the directory accepts your home directory or anything above it, so a session started in `~` is never taken for the project's), and a reader that has sessions of this directory's own outranks one that only has the fallback list of every project, where before the newest session on the machine was picked and then refused as another project's while this one's own was there. - **`stroq sent` ticked `✓` when there was nothing to check against.** With no credential file or `.env` indexed the report opened with "No known credential value … checked against 0 indexed value(s)". It now opens with `?` and says what was missing; the tick is kept for a run that indexed at least one value. - **`stroq sent --last` read one session and did not say so.** A clean verdict about the newest session of a project with 237 of them read as "the project is clean". The coverage section now says "Read the newest of N sessions recorded for this project", counting only the sessions the project itself has (every reader falls back to every project's sessions when a folder has none, and that list is not counted), and the JSON carries `coverage.sessionsInProject`. - **`stroq sent` with no session ended on a dead end.** It now ends with the two commands that need no session: `stroq attack` and `stroq init --agent `. - **A Stripe key found in a folder called `GitHub` was sent to GitHub's token page.** The rotation link was chosen from the credential's name and its whole path, first match wins. It is now chosen from the name (`STRIPE_API_KEY`; `NPM_TOKEN` is npm but `PNPM_HOME` is not), falling back to the file only where the file is itself a provider's (`~/.aws/credentials`, `~/.npmrc`); when nothing says which provider issued the value, no link is printed. - **A bare `stroq init` guarded Claude Code even when the machine had only Cursor or Codex.** It is the command the README and the site tell a newcomer to run, and it wrote hooks into a `.claude/settings.json` no agent of theirs reads, after which `stroq doctor` read green because at least one agent was guarded. With no `--agent`, Claude Code is still the answer when it is found or when nothing is; when exactly one other agent is found, that one is guarded, and it says so; when several are found and Claude Code is not among them, nothing is installed and the command for each is printed. Agents are looked for in your home directory, not in the project, so a `.agents` or `.cursor` folder that came with a repository does not choose. Whichever is installed, the agents found and not yet guarded are named with the command for each (carrying `--user` when it was asked for), on stderr, so `--dry-run` output stays the config it would write. - **The plugin blocked every action of a user without a global `stroq` until a release reached npm.** The pin in the plugin's hook wrapper reaches the default branch, which plugin users update from, before npm has the version: the release is staged and waits for approval. In that window `npx` reported `ETARGET` for the pinned version and the wrapper exited 2 on every `PreToolUse`, which blocks `Bash`, `Write`, `Edit`, `Read`, `WebFetch` and every MCP call. That one failure, and no other, is now retried once with the newest release; a failure of `stroq` itself is never retried, so the pin still means something. Checked against the real registry with a pin of `99.0.0`. - **A registry that hung turned the plugin's firewall off.** `npx` has no deadline, and Claude Code lifts a hook that outlives its 15 s timeout and lets the call through. Per-fetch timeouts do not bound it (each request can wait, and a fresh install makes several), so the whole `npx` path, the pinned attempt and the fallback together, now has one 11 s deadline, after which `npx` and everything it started are ended and the exit is non-zero, which blocks a `PreToolUse` and lets a `PostToolUse` through. The fallback is not started when the pinned attempt used up the time. Checked against the real registry with an unreachable address: ended at 11 s, blocked. ## [0.21.1] - 2026-09-30 ### Fixed - **A fresh Codex install did nothing, and `stroq doctor` said it was installed.** Codex runs a new or changed hook only after the user approves it — measured on Codex 0.158: a user-level Stroq hook ran under `codex exec` only with `--dangerously-bypass-hook-trust` — and nothing in `init` or `doctor` said so. `init --agent codex` now says the hooks need approving (and again after each upgrade, since the command changes), `doctor` fails the `codex hooks` line as NOT APPROVED when Codex's `config.toml` records no hook approval at all, and docs/AGENTS.md describes the step. The old note that `--user` "skips that prompt" was about project trust only and is corrected: user-level hooks need approving too, and under `codex exec` project hooks did not load at all. ## [0.21.0] - 2026-09-29 ### Added - **`stroq sent` opens with its verdict.** One line says what the scan concluded before any detail — `✗ 1 known credential value(s) … aws_secret_access_key`, `✓ No known credential value in 312 tool call(s), checked against 41 indexed value(s)`, or `!` when a credential file was touched without an indexed value — and the NEXT block links each credential whose provider it can tell (AWS, GitHub, npm, OpenAI, Anthropic, Stripe) to the page where it is rotated. The README, the npm page and /session-secret-scan/ show a trimmed example from a synthetic session. - **`stroq why` ends a deny or an ask with the way out**: the `stroq untaint --session ` command to run outside the agent, and a link to the false-positive form pre-titled with the rule. ### Changed - **One promise on every surface.** The link preview (the image HN, X, Slack and the site show), the plugin marketplace and the Claude Code plugin now say what the README and npm say: find known secrets in AI coding agent sessions, then guard the next one — with `npx @stroq/cli sent --last` as the first command. npm's `homepage` is stroq.dev. - **The issue forms ask for less.** The false-positive form no longer requires the raw flagged text, which for a secrets tool meant pasting private content in public; the smallest excerpt, with secrets removed, or a description is enough. A short "Question or feedback" form is new, and the bug form's version hint works for `npx` users. The site's "Report a bypass" link goes to the private advisory form, as SECURITY.md asks. ## [0.20.1] - 2026-09-29 ### Security - **Claude Code's `Monitor` and `PowerShell` tools ran commands Stroq never saw.** Both run a shell command — `Monitor`'s script "runs in the same shell environment as Bash" — and neither was in the hook matcher, so a `curl … | sh` through either reached no hook and left no audit line. Both are now in the `PreToolUse` matcher, judged by the same command classifier as `Bash` (which reads PowerShell syntax too), and high-impact for the fail-closed path; `PowerShell` output is scanned like `Bash` output. Re-run `stroq init` (or `/plugin update stroq`): `stroq doctor` reports an install with the older matcher as incomplete. - **The 0.20.0 rule that keeps an agent from running `stroq untaint` missed most of the ways to spell it.** `npx stroq`, `pnpm exec stroq`, `pnpm`/`yarn stroq`, `npm exec`, `npx -p @stroq/cli stroq`, `stroq.cmd`/`.exe`, a Windows path, `$(which stroq)`, a variable holding `stroq`, and `node packages/cli/dist/index.js` in a checkout were all allowed. It now resolves the program the way a shell and a package runner would. It also stopped denying text: `stroq init --help`, and a line of a commit message or a heredoc body that starts with `stroq init`, are no longer read as commands — while a string handed to `sh -c`/`eval` and a heredoc fed to a shell still are. - **A shell tool whose command Stroq could not read was allowed.** A `Bash`, `PowerShell` or `Monitor` call without a string `command` — a host that renamed the field, say — was classified as an empty command. It is now `shell.unparsed`, which the default policy asks about. ### Changed - **A Claude Code result Stroq could not find is recorded as not scanned, not as clean.** A `PostToolUse` with neither `tool_response` nor `tool_result` — what a renamed field would look like — used to be scanned as an empty string and audited as a clean scan, so a change in Claude Code's payload would have gone unnoticed. The audit line now reads `not scanned: no result field (keys: …)`. The other adapters still need the same. - **`stroq uninstall --agent codex` removes Stroq from an event written as a single group object at the file's root**, a shape Codex reads and `init` lifts; it left Stroq's handler there and reported it removed. ### Fixed - **`stroq sent --last` refused every Cursor session** (since 0.20.0). The Cursor reader records the files a session touched rather than a working directory, and the check that keeps another project's session out read a file inside this project as another project. A session now belongs here when either path contains the other, compared through symlinks, so a project reached through a link (`/var` → `/private/var`) is the same project. ## [0.20.0] - 2026-09-28 ### Security - **An agent could clear its own taint with `stroq untaint`.** `stroq untaint`, `stroq trust ` and `stroq init` change what Stroq enforces, but they touch no protected path, so run through Bash they came back with no class and were allowed in a tainted session. They are now `config.self` (deny) in the command position however spelled — `stroq`, a path to it, `npx @stroq/cli`, `pnpm dlx`, `node …/@stroq/cli/dist/index.js` — and so is the new `stroq uninstall`. `--dry-run`, `trust` without a file and every reading command stay allowed; a mention (`grep "stroq untaint" docs/`) is not a call. ### Added - **`stroq uninstall [--agent ] [--user] [--dry-run]`.** Takes Stroq's entries out of an agent's config and leaves everything else in it as it was; `--agent mcp` unwraps the servers. `init` now says how to undo it, and the self-tamper deny names it. - **`--help` on every command**, and `stroq help []`. The text comes from one table, and a test fails when a command parses a flag the table does not list. ### Changed - **A deny the taint caused says how to undo a false positive.** It names what tainted the session and gives the exact commands, with the real session id — `stroq untaint --session `, and `stroq trust ` when the source was a file read — to run outside the agent. The one reason that mentioned `untaint` before printed a literal ``. - **`stroq trust` waives the trusted bytes however they are read.** An entry matched only the source string a taint recorded, so a Bash `cat` of the trusted file, a relative path, or a path longer than the 120 characters a source keeps tainted again. The digest is the pin; the source is kept for `--list`. - **`stroq sent --last` no longer reads another project's session.** With no session recorded in this directory it fell back to the newest one anywhere, matched it against this project's `.env` and reported it as this directory's. It now names the directory that session ran in and says how to read it; a session from a directory containing this one is the same project and is read. The report ends with what to do next: rotate, `stroq replay --last`, `stroq init`. - **`--last` finds the sessions of a project whose path has a space, a non-ASCII letter or a Windows drive.** Stroq derived Claude Code's transcript directory by replacing only `/` and `.`; Claude Code replaces every character that is not an ASCII letter or digit, so those projects were never found and `--last` fell back to every project. - **`stroq replay --last` speaks in the conditional.** A transcript is replayed through today's policy after the fact, and printed "DENIED … 17 s later" for a `curl` that had run. It now prints `WOULD DENY` and "would be denied (today's policy)", says it is not a record of what was blocked, and names the rule of an action with no untrusted origin instead of a bare `deny`. - **Usage errors are one line and exit 2.** An unknown option or a missing value used to throw a raw `TypeError [ERR_PARSE_ARGS_…]`; `doctor`, `exposure` and `verify` ignored options they did not have. An unknown command prints the closest one (`Did you mean "sent"?`) instead of the full usage. `stroq hook` with no agent prints its usage instead of waiting on stdin, and `stroq log --json | head` no longer ends in an EPIPE stack trace. ## [0.19.2] - 2026-09-27 ### Security - **Hooks installed with `npx` stopped guarding when npm pruned its cache.** `npx @stroq/cli init`, the README's own instruction, wrote the path of the CLI inside npm's npx cache into the hook command. Once npm pruned it, every hook failed to start, Claude Code treats that exit as a non-blocking error and runs the call, and `stroq doctor` still said "installed". `init` now copies a CLI started from the npx cache, with its dependencies, to `~/.stroq/cli//` and points the hooks there, and `doctor` fails a hook whose Node or CLI path no longer exists, naming the path. Re-run `stroq init` once if you installed with `npx`. - **The Claude Code plugin ran `@stroq/cli@0.12.1`.** Without a global `stroq`, the plugin's hook runs a pinned version through `npx`, and the pin had not moved since 0.12.1, so plugin users ran without the fixes of 0.16.0 through 0.19.1. A test now ties the pin to the release. Run `/plugin update stroq` to pick it up. - **A package named at the end of a sentence lost its provenance.** "To fix the build, run npx helper-fix." recorded `helper-fix.`, so `npx helper-fix` matched nothing the agent had read and carried no origin class. Package names now shed the punctuation prose puts after them, as URLs already did. - **A malformed provenance record read as a clean origin.** The provenance store accepted any JSON array; a record whose `suspect` was missing or not a boolean dropped `origin.suspect`. Every record is now checked, and a bad one is corruption, which fails closed as the session store already did. ### Fixed - **The published CLI could not read Cursor sessions.** The bundler rewrote `node:sqlite` to `sqlite`, which does not exist, so `stroq sent` found no Cursor session and blamed the Node version. The store tests imported the source; a test now runs the built CLI. - **The MCP proxy left a call unanswered when its own deny failed.** A `tools/call` whose engine threw is denied after an audit append; when the append failed too, the client got no reply at all. It now gets the fail-closed error. ## [0.19.1] - 2026-09-27 ### Changed - **`stroq sent` states what a local record proves, and no more.** It used to say a matched credential "already reached a model provider"; a transcript shows the value was in a recorded tool result or argument, not that a request carrying it was sent, received or kept. The report, `--help`, the README, the guide and the site now say that, and a credential-file row separates a recorded `Read`/`Grep` from a path only named in a shell command. The JSON output is unchanged. - **The npm description and README lead with the session scan** (`npx @stroq/cli sent --last`), list Antigravity and `stroq sent`/`stroq replay`, and count 21 attack scenarios, 12 from public incidents and 9 synthetic. ## [0.19.0] - 2026-09-25 ### Changed - **Reading a `curl … | sh` install line no longer taints the session.** On a corpus of 121 benign files — the 25 it had, plus the root README of each of the 100 most-starred Apache-2.0 repositories, chosen by that rule rather than by hand — the false-positive rate was 24.0%, and 19 of the 29 flagged files were one rule, `STROQ-2026-00005`, on README install lines. It is medium now, below the taint threshold: 14.9% on the same corpus. Running `curl … | sh` is still denied in any session, running the line that was read is still asked about or denied through provenance, and writing one into a file an agent loads as instructions is still asked about (writes there are scanned at a lower threshold). Text that carries only this pattern — an issue title, a PDF's text — no longer taints on its own; `stroq attack` scenarios 15 and 20 are still blocked, at the command. The bench corpus files are stored byte for byte (`-text`), since one README has CRLF. ### Added - **Decoy files: `stroq canary --file `.** Plants a credentials-shaped file somewhere no task you ask for needs — `~/.aws/credentials.bak` — holding a canary value. Any agent call that names it (a `Read`, a `Grep`, a `cat`, relative or through `~` and `$HOME`) is denied as `fs.canary` and taints the session: the agent was steered there by something it read that the rules did not catch. Created only where nothing exists, mode `0600`; only the path is recorded, in `~/.stroq/canary-files.json`. ## [0.18.0] - 2026-09-25 ### Security - **A download straight into a protected file was not self-tamper.** `curl -o`/`-O`/`--output`, `wget -O` and PowerShell's `-OutFile` are neither a writer verb nor a `>`, so `curl -s https://… -o .claude/settings.json` replaced the hook config with no class at all in an untainted session. They are write intent now, for self-tamper and for the new instruction-file guard; so are `rsync` and `patch`. - **`>|` was read as a pipe.** The segment splitter cut `echo x >| file` into `echo x >` and `file`, so no segment held both the write and its target. Found, with the two above, by a security review of the instruction-file guard below. ### Added - **Writes to the files an agent loads as instructions are guarded (OWASP ASI06).** A session that read something hostile could save an instruction into `CLAUDE.md`, `AGENTS.md`, rules, skills or Claude Code's per-project memory, and every later session would load it; editing those files was treated as ordinary work in any session. Such a write is now `config.instructions`, asked about in a tainted session, and the text being written is scanned as an instruction file would be when read back: a write whose own text trips a rule is `config.instructions_payload`, asked about in any session. In an untainted session, ordinary edits are unaffected. A shell write is recognised however it spells the file — quotes spliced into the name, a variable assigned earlier in the command, `./` and `..`, a trailing dot Windows strips. A patch reaches Stroq as paths only, so for Codex's and Copilot's `apply_patch` the taint alone decides, and so does `git apply` of a diff file, whose targets are inside the diff. `stroq attack` gains scenario 21, a contributing guide that asks the agent to save a pipe-to-shell step into `CLAUDE.md`; it is asked about. - **`stroq exposure` scans `~/.claude/CLAUDE.md` and each project's `~/.claude/projects/*/memory/*.md`,** which are loaded into every session like the instruction files it already read. - **`stroq log --json`** prints each audit entry as one line of JSON, as the chain stores it, for a SIEM forwarder or `jq`. - **`stroq exposure` names the instruction and skill files that appeared or changed since its last run.** A malicious skill does not need a new name: an update can swap the text of one already installed. Each run records the sha256 of every file it read in `~/.stroq/inventory.json` (paths and hashes, mode `0600`) and the next lists what is new or changed, marked if flagged. Not a finding, so the exit code is unchanged: editing `CLAUDE.md` is ordinary work. - **`stroq inspect --sarif`** writes its findings as a SARIF 2.1.0 log for GitHub code scanning, each placed at its file in the repository, so a pull request that adds pre-approval execution shows up as an alert. The guide has a workflow snippet, and Stroq's own CI uploads it for this repository. ## [0.17.0] - 2026-09-24 ### Security The first CodeQL run over the repository, and a profile of the command classifier that followed it, found ways to hold a hook until the agent's own timeout answers it — which Codex and Copilot treat as an allow. A regex that runs for seconds blocks the event loop, so Stroq's own fail-closed deadline cannot fire. - **`mkfifo package.json` held every later Bash hook in that directory.** The provenance reader stat'ed a manifest and then read it by name, never checking its type, so opening the pipe waited for a writer that never came: `stroq hook` on a plain `ls` was still running at 25 s. Manifests, agent configs, `stroq exposure`'s reads and the Windsurf and Antigravity post-read scan now open the file once (without blocking on a pipe), check that handle, and read only a regular file. - **Crafted commands took seconds to classify.** `find . -exec` followed by 4 KiB of spaces took 23.7 s, 16 KiB of `eval ` 28 s, a dependency name of 262,000 quotes in `package.json` 30 s on every Bash call, and 199,000 `!` in tool output 48 s. Every regex on the classification path now runs in linear time: each of 45 adversarial 256 KiB commands classifies in a fraction of a second, and a test holds their growth. Each rewritten pattern is checked against the old one on generated input, so what is detected is unchanged. - **A command nested too deeply to read in time is asked about.** An unquoted `eval` argument runs to the next delimiter, so on one line they nest; past a budget of nested text (twice the command plus 64 KiB, which no ordinary command reaches) extraction stops and the command gets `nested-commands-too-large` in `shell.unparsed`, which the default policy asks about. What was extracted before the budget ran out is still classified. ### Fixed - **On Windows, a hook's audit append could fail under parallel tool calls.** Windows answers `EPERM` instead of `EEXIST` when a lock directory is created while the previous holder is still removing it; the file lock now waits on it like any contended lock. The same lock guards the taint, provenance and cloak stores and the secret index. - **`/home/alice/.env` was shown as `~ice/.env` for a user whose home is `/home/al`,** on every platform, and Windows paths under home were shown with backslashes. Paths under home are now cut on a directory boundary and written with forward slashes. - **`stroq init --agent openclaw` looked for a bare `openclaw` on Windows,** where the runnable shim is `openclaw.cmd`. It now follows `PATHEXT`, and on Windows prints the two install commands instead of running a `.cmd` through a shell. - **Canary values drew their first eight letters a quarter more often** than the rest (a byte modulo 62); they are uniform now. - **The bench corpus failed its hash check on a Windows checkout,** where Git converts text to CRLF. `.gitattributes` keeps LF. - **The Codex argument reader lost a `__proto__` key.** It built objects by assignment, and assigning to `__proto__` sets the object's prototype instead of adding a field: a value under that key vanished from the arguments `stroq sent` scans, and an object there made `input.cmd` answer through the prototype chain while the object's own fields said nothing. Fields are now defined as own properties, as `JSON.parse` does. Found by the property tests below, on the first run that generated the key. ### Changed - **Property tests for everything that reads attacker-written text** (`fast-check`, a dev dependency): shell segmentation, normalization, JSON leaf walking, control-character neutralization, prose-name matching, and the Claude, Codex and Cursor session readers. Beyond not throwing and staying fast, they check correctness: any JSON object read by the Codex literal reader comes back exactly, neutralized JSON still decodes to the original, a heredoc body written to a file is dropped while one a shell runs is kept, and no reader pairs a result with a call it never saw. - **End-to-end tests run the built CLI** rather than the source through `tsx`, so they test the artifact users get; the suite takes 24 s instead of 57 s. Coverage thresholds sit just under the measured values instead of seventeen points below. - **Dependabot** proposes grouped weekly updates for npm and GitHub Actions. - **Windows is a required CI job**, alongside Linux and macOS. The tests of POSIX-only behaviour (mode bits, signals, the bash plugin wrapper, srt) skip there and say why, and `SECURITY.md` has a Windows section on what that leaves unverified. - **CodeQL and OpenSSF Scorecard run on every push to `main`.** CI's token is read-only; the release workflow grants `id-token: write` to the publish job only. - **`SECURITY.md` names the supported release as "the latest on npm"** instead of a version that had gone stale. ## [0.16.1] - 2026-09-24 ### Security A second audit ([docs/audits/2026-09-24-stroq.md](docs/audits/2026-09-24-stroq.md)) looked where the first did not: what Stroq prints, and what it writes into a repository someone else wrote. - **Attacker-written text reached the terminal as raw control sequences (B-01).** `stroq replay` and `stroq log` printed the escape sequences in recorded commands and audit summaries as they were, so a transcript could write the clipboard through OSC 52 on terminals that allow it, or paint a fake `ALLOW` over the real verdict, inside the commands someone runs to find out what an injected agent did. A hook's deny reason, which the agent shows the user, carried them too. Every command except `hook` and `mcp` now writes control characters as visible `\uXXXX` escapes, and so do the evidence sentences in hook reasons; JSON output still parses to the original. - **`stroq init` wrote through a repository's symlink (B-02).** A cloned repository that made `.claude/settings.json` a link to a file elsewhere got Stroq's hooks merged into that file. A config write must now stay inside the project, or the home directory for a user-scope install, through every symlink in the path; a dotfile manager's link within the home directory still works. - **A config parse error quoted the file (B-03).** V8's message quotes the input, and a config symlinked to `~/.npmrc` made that the start of a credential file. It now names the position only. ### Fixed - **A config symlinked to `/dev/zero` hung `doctor`, `init` and `exposure` (B-04).** The shared config reader now reads only a regular file of at most 4 MiB, as `inspect` and the secret index already did. - **`stroq sent` could spend minutes on one command (B-05).** The heredoc filter's env-prefix pattern backtracked quadratically: 41.7 s on a 400 KB `env a=a=a=…`. It is now linear, 0.4 ms on the same input. - **`SECURITY.md` sent researchers to limits "the README documents" (B-06)** after the README moved to `docs/GUIDE.md`. It now links the sections in `docs/AGENTS.md` and the guide, and lists Antigravity. ## [0.16.0] - 2026-09-23 ### Security A security audit of 0.15.2 ([docs/audits/2026-09-23-stroq.md](docs/audits/2026-09-23-stroq.md)) found eight P1 defects the test suite and the attack corpus did not cover. Each is fixed with a regression test built from the audit's own synthetic case, and each case was re-run independently of those tests before merging. - **An encoded instruction after fifty harmless encoded tokens scanned clean (A-01).** The normalizer decoded only the first 50 base64 and hex tokens of each layer, so an instruction placed after ~2 KB of benign base64 produced `clean` and no provenance. Every token is now decoded; the work stays bounded by the 200,000-character scan window and the scan budget. Real lockfiles with 200–400 integrity hashes scan in 64–206 ms, and the worst synthetic case, 6,898 tokens filling the window, in 3.7 s, under the 4,000 ms budget, and fails closed past it. - **File-shaped MCP tools went around the path classes (A-02).** `write_file(path: '.claude/./settings.json')`, a `..` detour, or a write into `.git/hooks/` through an MCP server was allowed while the same native write was denied, and an MCP `read_file` of `.env` under taint was not a secret read. Path-like arguments of read- and write-shaped MCP tools are now normalized and classified exactly as native file tools are. Prose that merely mentions a protected path is still not self-tamper. - **The cloak judged a call before restoring it (A-03).** A placeholder was judged, then replaced with its value on the way to the server, so a server could plant `.claude/settings.json` in a cloaked field and have the model write to it through the placeholder. Restored arguments are now judged; the audit still records the placeholders the model sent. - **A known secret could be written to the audit log (A-04).** Only outbound actions were checked against the secret index, so a local `printf` of a `.env` value put that value in both audit records. Every `pre` and `post` summary is now matched against the index before it is written. - **A failed result scan delivered the result uncloaked (A-05).** With `--cloak` on, an exception in the post-scan forwarded the server's result as it was. The cloak now runs regardless, and a result that cannot be cloaked is dropped. - **A partial install counted as protection (A-06).** `doctor`, `exposure` and `stroq run` accepted any Stroq command anywhere in a hook file, so a post-only Claude or Codex config, or a Cursor config without its blocking events, passed. Each agent's required events, matchers and fail-closed flags are now checked and the missing ones named. - **`Grep` over a secret file was unclassified (A-07).** A tainted `Grep` of `.env` through Copilot or Antigravity was allowed; it is now `fs.secrets`. - **Well-formed but wrong session state could lift a taint (A-08).** A session file with `"level": "BROKEN"` loaded and the next `curl` was allowed. Session state is now validated on load and anything else fails closed. ### Fixed - **A stale lock could be taken from a living owner (A-09).** Locks now carry an owner token and are never reclaimed from a live process by age alone; release checks ownership. A multi-process test holds a critical section past the stale interval and checks the audit chain. - **`stroq trust` removed the taint but not the suspect provenance (A-10).** A command from a trusted file was still denied as `origin.suspect`. Trusting exact content now waives both; a changed byte restores the protection. - **PowerShell read `;` as `|` (A-11).** `iwr … ; iex $x` was classified as fetch-and-execute. Only a real pipe is. - **Release staging was not pinned to what CI verified (A-12, A-13).** The release workflow now refuses a tag that does not match the package version, repeats the format, type, test, rules, reports, attack and fuzz gates before staging, and pins npm 11.15.0, checking that `npm stage` exists first. - **Five defects in the audit fixes themselves, found reviewing them.** Judging restored arguments had put the restored value in the audit summary — the MCP demo's real email reached `audit.jsonl`. A lock contender that found another contender's `.reaper` directory spun with no pause and no deadline, so a reaper killed mid-reap kept every hook busy for up to 60 s. The new Cursor write gate denied every Write/Delete whose path it could not find; the payload's field names are Cursor's and undocumented, so an unrecognised shape is now allowed and recorded as `cursor-write-path-unread` instead of blocking every edit, and camelCase fields such as `relativeWorkspacePath` are read. `doctor` called any hook file without Stroq's events an incomplete install, failing the Claude line for a Cursor-only user with their own `.claude/settings.json`. And A-06 had reached `doctor` and `stroq run` but not `stroq exposure`, which kept its own any-Stroq-command check; it now uses the same definition. ### Added - **Cursor editor writes can be blocked.** `init --agent cursor` installs a `preToolUse` gate on `Write|Delete` with `failClosed`, so an edit to Stroq's config, another agent's hooks or `.git/hooks` is denied before it happens rather than audited after. `ask` is rendered as a deny because Cursor does not enforce it on this hook. It is checked against synthetic payloads, not a recorded Cursor session; Tab edits have their own hooks and are not covered. An existing install gains the gate by re-running `stroq init --agent cursor`, and `doctor` says so. ### Changed - **The README is 39 lines.** Everything it held moved to [docs/GUIDE.md](docs/GUIDE.md) with the same headings, so old anchors still resolve. - **Docs, site and the BENCH template state the 4,000 ms scan budget, seven agents, and what the cloak detects in labelled fields.** The site's static test count is gone, since it was always out of date. ## [0.15.2] - 2026-09-23 ### Fixed - **`stroq sent` reported a path inside a heredoc as a credential file the command named.** For a shell call it searched the whole command string, so `cat > page.mjs <<'EOF'` whose body listed `~/.npmrc` as an example was reported as the session touching `~/.npmrc`. That was the first finding on the author's own machine before a launch post, and it was a site edit, not a read. Measured over 626 Claude Code transcripts: 20 Bash calls named a credential file. 8 named it as an argument of the command (`cat ~/.npmrc | sed …`, `ls -la ~/.aws/credentials`, a node script reading the token) and all 8 are still reported. 12 named it only inside a heredoc body that was written to a file or read as text (HTML, a test file, a spec, a PR body, a commit message) and none of them is reported any more. Each of the 20 was checked by hand. A body is still read when something executes it: `bash <#`), since it has no file of its own. ## [0.15.0] - 2026-09-22 ### Fixed - **The scan budget was smaller than a scan.** `DEFAULT_BUDGET_MS` was 500 ms, and exceeding it fails closed — `timedOut` becomes `suspect`, which taints the session and denies later actions. Measured over the 25 files of the vendored benign corpus with no budget at all: **p50 46 ms, p95 497 ms, max 828 ms on an idle machine**, and p95 1,559 ms with 14 jobs running across 10 cores. So ordinary third-party documentation was being marked suspicious **4% of the time on an idle machine**, and 12% under load, with the session tainted afterwards. The evidence was already in the repository, in two files that were never read together. `bench/run.ts` recorded that its slowest corpus file "measures well under 1 s". `HOOK_DEADLINE_FRACTION` recorded that "the only wall-clock budget in the decision path is the scanner's 500 ms". Both true; together they say the budget is smaller than the work. It is now **4,000 ms** — 2.1x the worst measured under heavy contention, 4.8x the worst measured idle, and still answering with 5 s to spare against the hook's own 9,000 ms deadline, so the watchdog remains the backstop it was. This does not move the primary defence against a pathological regex, which is the build-time gate, now measured at the scanner's own 200,000-character cap. `STROQ_SCAN_BUDGET_MS` overrides it for a machine where even that is wrong; it cannot weaken the guard in either direction, since a smaller budget fails closed sooner and a larger one only lets the scan finish. `stroq bench` now prints the comparison nobody was making — `slowest: 623 ms against production's 4000 ms budget — 6.4x headroom` — and flags a headroom below 2x. The figure is deliberately kept out of the generated `docs/BENCH.md`, because a millisecond in a committed file makes `check:reports` fail on every machine but the one that last ran it. - **The test suite reported how busy the machine was.** Under 14 jobs on 10 cores, eleven tests failed across eight files, a different set each run. Three causes, none of them a bug in the code under test: Every failure of the first kind was `clean` becoming `suspect` — the budget above, firing on benign fixtures. The suite now sets `STROQ_SCAN_BUDGET_MS` high in `test/setup-env.ts`, so an assertion about behaviour is never decided by a stopwatch; the tests that exercise the timeout pass an explicit `budgetMs`, which still wins. The second kind was assertions that _are_ stopwatches: `expect(elapsed).toBeLessThan(1000)` against a real cost of 110 ms, and `toBeLessThan(2000)` against 400 ms. A ratio was tried first and was not enough — a ratio cancels constant load, and the two measurements happen at different moments. At these input sizes linear-under-load and quadratic-idle overlap, so no stopwatch here can separate them; what actually bounds these functions is the input cap. The assertions now state a ceiling only a blowup of a different order can cross, and say so. The third kind was `await setTimeout(150)` standing in for a condition. The signal-escalation tests slept, hoping the child had installed its SIGTERM trap; on a loaded machine it had not, the signal killed it outright, and the proxy was reported as escalating after 59 ms against a 200 ms grace period. Both stub servers now write a readiness marker and the tests wait for it. `testTimeout` is raised from vitest's 5 s default, because a large part of this suite spawns a real CLI through `node --import tsx` and compiles TypeScript on every start. - **A pipe is not a semicolon.** `remote-pipe-shell` and `decode-pipe-shell` are named for a pipe and were matching a **sequence**. `splitSegments` cuts on `|`, `;`, `&&`, `||` and newline with one regex and keeps no record of which it was, so `curl x.sh | sh` and `curl x.sh; sh` reached the classifier as the same two segments — and only the first is a fetch being executed. Measured on **4,902 distinct shell commands** taken from this machine's own Codex rollouts and Claude transcripts: the sequence reading denied **12** of them, every one an ordinary `ssh host '…; python3 -c "…"'` diagnostic. `python3` is in `SHELLS`, and the remote script's own `;` put it in a later segment of the same command line. The reason printed on those denials was "executing decoded or remotely fetched code", which is false about that command — and on a tool whose product is the reason, a wrong reason on a deny is the expensive kind of defect. Both signals now walk actual pipelines. Over the same corpus, denials on a clean session fall from **23 to 5**, and the five that remain are the shape the rule is for — `python -c "exec(…)"` and a real `curl … | python3 -c`. On a **tainted** session the count is unchanged at 233, so nothing was given up where it matters. `stroq attack` still reports 20 scenarios, 15 blocked, 5 asked, 0 through, and `--fuzz` 0 escapes of 350: every fetch-and-execute in that corpus uses a real `|` or `bash <(curl …)`, so none of it depended on the loose reading. What is knowingly given up is the accidental coverage of `curl -o f url; sh f`, where the link between fetch and execution is a file rather than a pipe. That needs data flow, not separator awareness, and the old reading only caught it by also catching `curl url; ls`. **This was not the fix the roadmap asked for.** The site listed "a quote-aware shell lexer" next, and the measurement says that is the wrong change: `shell-segments.ts` over-splits inside quotes on purpose, and that is the only reason the classifier sees inside `python3 -c '…;os.remove(…)'` at all. A quote-aware lexer would lose that to fix 0.24% of commands. The defect the corpus actually pointed at was the pipe, and it is smaller. - **`stroq sent --last` crashed on a long session.** Both readers loaded the whole file with `readFile(path, 'utf8')`, and V8 caps a string at 536,870,888 characters. On the machine this was found on, four Claude transcripts are over 200 MB and the largest is 1.3 GB, so in that project the command answered with a bare `RangeError: Invalid string length` thrown from inside `node:fs` — no report, no explanation, and the failure got worse the longer someone had been using the agent. Both parsers are now fed one line at a time from a stream and never hold the file as a string: the same 1.3 GB transcript reports 16,531 tool calls in 10 seconds. Lines are split with `crlfDelay`, so a transcript written on Windows no longer leaves a `\r` on the end of every recorded value. ### Added - **The MCP cloak now claims a person in prose, once the same result has named them in a field.** `{"first_name":"Peter Parker","note":"call Peter about the invoice"}` used to cloak the field and hand the model the note intact, which protects nobody. The detector was being shown one leaf at a time; it now runs a second pass over the whole result with the names the first pass produced, so the person is replaced everywhere in that result — with the **same** placeholder, so the record still reads as being about one person. **The claim is still schema, not a guess.** Nothing here decides that a capitalised word is a person: it only finds again someone the server itself labelled one field over. That is the same standard `keyed.ts` was built on, extended from the field to the record. Two rules keep it from blanking ordinary sentences, and both are stated rather than tuned. It matches **case-sensitively**, because in prose a person is capitalised and a verb is not — so `mark the task as done` survives a customer called Mark. And a name that is also an ordinary English word is left alone **where a sentence begins**, the one position where capitalisation cannot separate the two: `Mark the invoice as paid.` stays readable, `ask Mark about it` is cloaked. That list fails in the cheap direction — a word missing from it cloaks something the agent wanted, a word on it lets one sentence-initial mention through after the field naming that person has already been cloaked. **NER is still not being added, and now there is a second reason.** The first stands: GLiNER-PII through ONNX Runtime would be this project's first native runtime dependency and would break `npx @stroq/cli`. The second came out of looking for something to measure against. Two independent corpora on this machine — Cursor's 65 recorded MCP results and 299 more across 631 Claude Code transcripts — contain **zero** fields naming a person; they are Supabase metadata, Playwright navigation and GitHub file reads. There is nothing local to evaluate a model on, and a model measured only against fixtures its own author wrote is not measured. The remaining gap is now narrower and precisely stateable: a person whom **no field in the result names at all**. - **`stroq sent` reads Cursor sessions.** The third agent the command can answer for, and the first that keeps no transcript files at all: every Cursor session is a set of rows in one SQLite store, `…/User/globalStorage/state.vscdb`, under keys of the form `bubbleId::`. A session is therefore addressed as `#` rather than by filename, and the store is opened **read-only** — it is the user's live editor state, and opening it for writing would take a lock the running editor is entitled to. Measured against this machine's own store: **9 sessions, 1,761 records, 1,126 tool calls, 0 unreadable**. Unlike Codex, where 82% of tool arguments are JavaScript rather than JSON, Cursor writes plain JSON throughout — every `params` parsed (1,037 of 1,037) and every `result` (962 of 962) — so this reader needs no parser of its own. It reproduces the survey exactly: 339 `Read`, 216 `Bash`, 137 `Write`, 65 MCP calls, and the rest passed through under their own names, in 425 ms over the whole store. **Two things the store does not say, and one it says in a way that cannot be guessed.** `params.cwd` is present and _empty_ on all 216 terminal calls, and there is no workspace record anywhere in the store, so a session's directory is read from the absolute paths in its own tool arguments; 8 of the 9 sessions locate that way, and the ninth made two tool calls that named no path. An MCP call's label collapses server and tool with a `-` — and a server name may contain `-` itself, `project-0-smart-smm-flutter-supabase` in the measured store — so the label is never split; `params.tools[0]` states both, and the name is composed from that through the same `mcpToolName` the live Cursor hook uses. **It is the one reader that can be missing at run time.** It needs `node:sqlite`, and `engines` allows Node 22, where that module is not there across the whole range: on 22.11.0 the import fails with `ERR_UNKNOWN_BUILTIN_MODULE`, and it resolves on 22.23.2 and 24. So the import is lazy — a reader that threw at load would take the other two down with it — and `sent` prints which Node is needed instead of reporting an empty session, because a reader that quietly finds nothing reads exactly like a session that was clean. The `ExperimentalWarning` Node prints on loading it is swallowed for the duration of that import, and only that one: this command prints a security report, and a Node-internal warning on its stderr reads as the report failing. **Copilot CLI and Antigravity are still not claimed, and this is why.** Both were the intended targets. Copilot CLI leaves `~/.copilot/logs` and no `session-state` directory — nothing of the conversation is on disk. Antigravity keeps its trajectories as base64-wrapped protobuf inside a VS Code state database, with no transcript file to read. Cursor was picked over both because it is the one with sessions on this machine to write a reader against, which is the rule the module already had. - **The MCP cloak claims names and street addresses from the field they arrive in.** The one category `stroq mcp --cloak` did not detect, and the plan for it was an NER model — the project's first native runtime dependency, the call it has already refused twice. It turned out not to be needed for the case that matters: an MCP result is JSON, the cloak already walks its parsed string leaves, and the enclosing **key** was in hand the whole time and thrown away before the detector saw it. `{"first_name":"Peter Parker"}` needed a model to guess at what the server had already labelled. A key is schema. It is a stronger claim than NER can make about the same characters, it costs no dependency, and it holds for names a model trained on English prose has never seen — which is most of the world's names. `first_name`, `surname`, `given_name`, `attendees`, `display_name`, `street_address`, `billing_address` and their spellings (`firstName`, `FIRST_NAME`, `first-name` are one key) now claim the whole leaf as `name` or `address`. Both are restorable, unlike a secret: the model acts on a placeholder and the server receives the real value back, which is the point — a calendar invite still reaches the right person. **The exclusions are the design.** A bare `name` is a filename, a repository, a branch or a product at least as often as a person, and cloaking those hands the model `[STROQ_NAME_1]` where it needed a filename — a cost to the agent's work for nobody's benefit. A bare `address` is an IP, an email or a wallet as often as a postal one. `username`, `login` and `handle` are identifiers the server itself looks up, so a placeholder in one breaks the call rather than protecting anyone. `city`, `country` and `postcode` identify nobody alone and the agent frequently needs them. Every one of those is written down in `keyed.ts` with its reason. **Two gaps remain, both stated rather than papered over.** A name in **prose** — `{"text":"call Peter about the invoice"}` — is not claimed, and that is still what an NER pass would be for. And a value labelled in one field is not chased into unlabelled leaves the way a `secret` is: a credential is a high-entropy exact string that cannot collide with ordinary text, while a name is a word, and propagating `Parker` into every leaf containing it would blank "mark" for a customer called Mark. The demo shows both halves of the first gap in one record — the labelled fields come back as placeholders while `Peter Parker` in the prose line travels untouched. - **The rule performance gate now measures at the size the scanner actually allows.** `scanContent` hands a rule up to 200,000 characters; the build-time gate escalated to 32,768 and stopped — 6.1x short. That gap matters only because backtracking is superlinear, and it matters at all because the scanner checks its wall-clock budget _between_ rules and cannot interrupt one V8 has already entered. Before it ships is the only place a pathological regex can be stopped, and the place it shipped through was not testing it at full size. The existing gate is unchanged and still does its own job: it decides relatively, against this machine's own p95, on blobs small enough to terminate on a catastrophic rule. A second, absolute gate now runs on its survivors at the scanner's own cap — absolute because this is a question about a fixed budget, and a faster machine must not be allowed to admit a slower rule. **The cap had to scale with the size, and CI is what said so.** `deriveThresholdMs` takes the minimum of an absolute cap and p95 × 30. At 32,768 characters the relative term binds and the 25 ms cap is a floor on strictness, which is its job. Reused unchanged at 200,000 the relative term is about 42 ms, so the cap becomes the binding term and a deliberately relative gate turns absolute — it passed on the machine it was written on and convicted a rule on a slower runner, the exact failure the existing gate's own comments are written against. The cap is a budget for an input size, so it scales with the input size. **The gate runs in `pnpm build:rules`, and deliberately not in the test suite.** An assertion that every shipped rule passes was written and CI removed it: a 639-rule sweep at 200,000 characters is six times the work of the gate's own sweep, so the window for a shared runner to deschedule one measurement is six times wider, and it convicted `ATR-2026-02304` — a rule that costs 0.04 ms locally and ranks 283rd of 639 against a 37.79 ms threshold. That is noise, and a test that fails on noise teaches people to rerun CI rather than read it. `check:rules` verifies the committed bundle byte for byte, so CI still proves the gate ran; it just does not re-run a stopwatch. **It convicts nothing today, and the measurement is why it is worth having anyway.** Every one of the 639 shipped rules is linear across that range (the cost ratio from 32 KB to 200 KB tracks the size ratio), the slowest single rule at the cap is 3.4 ms, and a full scan with every variant of 200 KB of adversarial input costs 37–117 ms against the budget of the time — 500 ms, since raised to 4,000 ms (see Fixed) — four times the headroom even then. The gate is for the next vendored rule drop, not for this one. It costs 0.2 s of build time. - **`stroq sent` reads Codex CLI sessions.** The command the front page tells a first-time visitor to run could answer for Claude Code and nothing else, which is roughly two in five of the agents in use. It now reads `~/.codex/sessions/**/rollout-*.jsonl` as well; `--last` takes the newest session either agent recorded for the directory, and a path given to `--transcript` is matched to a reader **by what is inside the file**, not by where it sits — a Codex rollout parsed as a Claude transcript yields no events at all, which prints as a clean session rather than as the mistake it is. **Codex does not record tool arguments as JSON, and that is the whole difficulty.** Measured on 73 real rollouts (24,638 records, 290 MB): 2,650 calls are `custom_tool_call`, whose `input` is a fragment of JavaScript — `const r = await tools.exec_command({cmd:"git status",workdir:"/w"})` — against 438 `function_call` records with a JSON `arguments` string. Of the 2,449 object literals in those scripts, **430 parse as JSON and 2,019 do not**: unquoted keys, single quotes, template literals, trailing commas, shorthand properties, spreads. A reader built on `JSON.parse` would answer for 18% of the corpus and silently report the other 82% as calls with no command in them. So the literal reader is written for the JS subset instead, and it reads **98.6%** of the corpus; where it cannot, the script's source text is kept verbatim, because a scan of the arguments still sees every character of it. A shell command is recovered from **1,650 of 1,652** Bash calls (99.9%). The whole corpus parses in 821 ms with zero unreadable lines. Two more traps, both real: a call and its output carry **different** `id`s and are paired only by `call_id`, so a reader written from the Claude one finds no results at all; and 78 scripts call more than one tool, where the single output stream cannot be divided between them and is attached to the call the script ends with. Tool names go through `codexToolName`, the same mapper the live Codex hook uses, so a session read back off disk classifies the way it would have classified live. ## [0.14.1] - 2026-09-21 ### Fixed - **`stroq sent --help` threw a stack trace instead of printing usage.** `sent` is the command the front page tells a first-time visitor to run, which makes `--help` the next thing they type — and in 0.14.0 it answered with a raw `ERR_PARSE_ARGS_UNKNOWN_OPTION` TypeError, because the option was never declared and `parseArgs` was called unguarded. It now prints the usage text and exits 0, before opening any credential file: a visitor asking what the command does must not have their `~/.aws/credentials` read to find out. An unrecognised flag is answered the same way — usage on stderr and exit 2, the conventional code for a bad invocation — rather than by letting the parser's exception escape. Both paths are covered by tests, including that `--help` produces no credential-file read. ## [0.14.0] - 2026-09-21 ### Added - **`stroq sent`: which of your credentials already reached a model provider.** Every tool in this space guards forwards — a scanner reads a file before the agent does, a control plane audits a call as it happens. Nobody answers the retroactive question: in the sessions you have already run, which of your credentials went out with the traffic, from which session, put there by which tool call. `stroq sent --last` answers it from the agent's own recording, so it needs nothing installed and covers sessions from before Stroq existed on the machine. **The name is the argument.** The plan called this `stroq leaked`, and that is the one option this project could not ship: "leaked" asserts a breach, and the observation is that a value was in the traffic between an agent and its model. Content reaching a model provider is how a coding agent works. So the finding is "this specific credential was in that traffic and you may not have known", the report says in as many words that nothing here claims the provider retained it, that a person saw it, or that it was used, and the action it supports is rotation rather than alarm. `stroq exposure --context` was rejected for a different reason — `exposure` maps this machine's live surface and exits 1 on findings, this reads session history and deliberately does not — and `stroq context` collides with the "context the agent reads" row `exposure` already prints, which means instruction files. **It reads your real credential files, and says so three times.** This is the one command that cannot use the throwaway home `stroq replay` runs in: it cannot tell you a value reached a model without knowing the value. So it builds the real index from `~/.aws/credentials`, `~/.npmrc`, `~/.netrc`, `~/.docker/config.json` and the working directory's `.env*` — stated in `--help`, in the report's own coverage footer (which names every file it opened) and in the README. Matching goes through the same salted-hash lookup the live guard uses, and a call description is scrubbed by the engine's own `redactMatches` before it is clipped, so a clip can never leave half a credential on screen. Nothing the command prints or writes holds a value. **Exit 0, even on a finding.** A session three weeks ago cannot be un-sent by the commit under review, and a gate that can never be satisfied is a gate that gets deleted. Exit 1 means no report was produced at all — no transcript, no tool calls in it, no audit entries — which matches `stroq replay` and makes a non-zero exit always mean "could not answer". `--fail-on-finding` is the opt-in for a scheduled job that should page a human the first time something new turns up. **Two false positives found by running it on 230 real transcripts, both fixed there.** A bare `.env` in a command means the `.env` of the directory _that session_ ran in: matched unconditionally it reported a credential-file read in 7 of 92 sessions, every one of them some other repository's file, so the relative spellings are now used only when the session's working directory is the one the index was built for, and the audit log — which records no working directory — gets none. And matching a credential path anywhere in a tool's input reported `~/.npmrc` as opened by `ExitPlanMode` and by `Agent`, two tools that read nothing and whose inputs are prose; file findings now come only from `Read`, `Grep` and `Bash`, and a shell command that names a file is reported as having named it, not as having printed it. After both fixes: 230 sessions, 3180 tool calls, 122 MB, zero false positives, 28 seconds — and a planted `stroq canary` is still named in a 59 MB real transcript while the same index stays silent on the unplanted copy. **Two sources, and the weaker one says so.** A transcript keeps the text of every tool result, which is where a credential usually is. Stroq's own audit log deliberately stores none, so that branch can speak only about tool arguments and credential-file reads; `SentCoverage.toolResultsRead` carries the difference into the report so "nothing found" from the audit log can never read like "nothing found" from a transcript. A per-agent reader is an interface with exactly one implementation — Claude Code, the only format there are real sessions here to verify against. - **`stroq mcp --cloak`: the MCP server's data no longer has to reach the model provider.** An agent that reads 400 customer rows out of a database MCP server, or calls `mcp__slack__send_message`, sends all of it to the model provider _and_ to a third party. With `--cloak` on (`stroq init --agent mcp --client --cloak`), the proxy replaces values it can identify in a `tools/call` result with stable placeholders before the model reads them, and restores them on the way back to that same server — so the agent acts on a record it was never shown: it sends `[STROQ_EMAIL_1]` and the server receives the address. Off by default. **Only the MCP proxy can do this, and the reason is worth writing down.** On Claude Code `PostToolUse` is read-only — there is no field that replaces a tool result. The tempting workaround, rewriting the `Read` through `PreToolUse.updatedInput` and handing the agent a redacted copy, **corrupts user data**: the agent reads `.env`, gets `[EMAIL_1]`, edits the file, and writes the placeholder into the real `.env`. A desktop cloak between a person and a chatbot never faces this because it owns the whole human→LLM→human channel; a coding agent runs arbitrary model behaviour between the read and the write. The MCP proxy is the one channel Stroq owns both ends of, and the loop closes safely because a placeholder never touches a file. **Detection is deterministic only.** The exact values of credentials this machine holds, via the index the egress guard already builds — strictly stronger than any pattern, since a random 40-character `.env` password has no shape to match — plus `email`, `phone` (E.164's 7–15 digit window), `iban` (ISO 13616 mod-97), `card` (Luhn) and `ssn` (the SSA allocation rules, ITINs included). **Person names and street addresses are not detected**: they need NER, and the credible offline option would be this project's first native runtime dependency, the same call that made `stroq run --sandbox` shell out to `srt` rather than link it. The detector is an interface so a later NER pass slots in; the demo deliberately leaves `Peter Parker` visible travelling to the model while his email, phone, card and SSN are all replaced. [docs/CLOAK-COMPARISON.md](docs/CLOAK-COMPARISON.md) is the row-by-row comparison with AgentCloak Desktop, including where AgentCloak wins. **The offsets problem was the hard part.** `RuleMatch` carries none, and the scanner fires on decoded variants — base64, hex, url — which have no position in the original text at all, which is why the engine's own `redactMatches` brute-forces every spelling instead of using positions. So the rule here is: a value is cloaked only where it was actually _located_ in the exact string being rewritten, and a value that cannot be placed is not cloaked. Patterns run with `matchAll` against the original string and never a variant; known secrets reuse `redactMatches`' four spellings but record the positions `indexOf` really returns; the rewrite walks right to left so earlier offsets stay valid, pinned by a test whose placeholders are longer than the values they replace. Detection runs over the string leaves of the parsed JSON rather than the serialised line, so no offset has to survive JSON escaping. Object keys are never rewritten — a key is schema — though a secret placeholder hidden in one is still found and still refuses the call. **A credential is cloaked but never restored.** The model only ever saw the placeholder, so restoring it on the way out would be Stroq itself sending your credential to a third party. Such a call is denied (`mcp-cloak-secret-restore`) with the credential named the way `deny-secret-egress` names it and its value absent — the refusal plan carries labels only, because it reaches a deny reason, an audit summary and, on a bad day, a stack trace. That asymmetry is also what makes the ordering safe: the call is judged as the model sent it, placeholders and all, and restored only on the forwarded line, which holds because the five kinds v1 restores contribute no action class and no provenance atom. A future detector that picked up something carrying classification weight would have to be judged after restoring instead; the constraint is written where the next person will be standing. **A reversible dictionary is a different threat model, so it is a different file.** Everything Stroq stored before is one-way — the secret index keeps `sha256(salt + value)`, provenance a redacted excerpt, the audit log a `redact()`ed summary. The cloak dictionary is the one exception: `~/.stroq/cloak/`, opt-in, mode `0600` in a `0700` directory, **one file per (session, server)** so a placeholder from server A can never resolve inside a call to server B, entries forgotten 12 idle hours after last use, 2000-entry LRU cap, a monotonic sequence that never hands a number to a second value. It reuses the lock, atomic write and self-healing from `secrets/index.ts` and deliberately not the one-way hash. A lost, expired or corrupt dictionary means a placeholder is forwarded as literal text — never that a wrong value is restored. `SECURITY.md` has its own section on it; `rm -rf ~/.stroq/cloak` deletes every one. **Two things the proxy guarantees are knowingly given up, and only where they had to be.** Byte-exact forwarding now has three exceptions instead of one — the pre-existing taint warning block, a cloaked result and a restored call — and the note at the top of `framing.ts`, where the invariant is stated, now says so; a message the cloak did not change is still forwarded byte for byte with the flag on. And an oversize server result (above 8 MiB, never parsed) or one that serialises past 2 MiB is **dropped** rather than forwarded, because delivering it would hand the model exactly the values the cloak was switched on to withhold. The client's request for it goes unanswered, which costs what a server that never replied would cost. Every substitution is in the hash-chained audit log by **kind and placeholder, never the value** — `CloakEvent` has no field that could hold one — and `stroq log` renders it as `cloak(cloak)` / `cloak(uncloak)` with the placeholders, instead of the `-(0.00)` an entry with neither a decision nor a scan used to print. - **`stroq run -- `: start an agent that is already confined.** Two of Stroq's protections can only be applied before the agent's first instruction, and until now both were something the user had to remember to do. `stroq run` is the launch doing them. The git settings `stroq inspect --env` asks you to export by hand are exported into the agent's environment instead, so `core.fsmonitor=false` and `safe.bareRepository=explicit` are in force before the startup `git status` — the moment no hook can reach, because on Claude Code it precedes the workspace-trust prompt that a `SessionStart` hook is itself gated on. They are **appended** to any `GIT_CONFIG_*` block already in the environment rather than replacing it, so a profile that already runs `eval "$(stroq inspect --env)"` keeps its settings, and a pair already present is not added twice. Measured end to end: a repository whose `core.fsmonitor` fires on a plain `git status` does not fire it through `stroq run`. The pre-approval read of the repository has the same deadline, and it is a **refusal, default-on**, rather than a warning or a flag. A warning printed a quarter of a second before a full-screen TUI takes the terminal is a warning nobody reads, and the person cloning a hostile repository is exactly the person who did not know to pass the flag. So is the hook check: `stroq run` asks `stroq doctor`'s own per-agent code — drift check included, so an entry that is present but no longer the command `stroq init` wrote is a refusal and not a tick — and will not start an agent it cannot see a Stroq hook in. `--force` launches after printing either refusal, `--no-inspect` skips the repository read, `--dry-run` prints everything and starts nothing. Fidelity was the other half of the work, because a launcher that eats Ctrl-C or loses an exit code is worse than no launcher. The terminal is inherited, not piped, so full-screen agents behave normally; the agent's exit code is returned unchanged and a death by signal becomes `128 + N`, matching what a shell reports for the same child; SIGINT/SIGTERM/SIGHUP are relayed and the launcher then waits for the agent's own answer instead of dying first; a program that is not on `PATH` is `127` with a message naming it. **`--sandbox`** additionally wraps the launch in Anthropic's `@anthropic-ai/sandbox-runtime` — `sandbox-exec` on macOS, bubblewrap on Linux — by shelling out to its `srt` binary rather than linking the library, so Stroq's dependency footprint is unchanged and the sandbox stays genuinely optional. When `srt` is absent the run says so in those words and continues; it is never a dependency and never a silent downgrade. Stroq generates the config, because srt's defaults are not a coding agent's (measured against 0.0.77: writes denied everywhere including the working directory, reads allowed everywhere, `denyRead` empty — "the sandbox blocks `~/.ssh` and `.env`" describes Claude Code's configuration of it, not srt's defaults). The `denyRead` list is the part neither tool could produce alone. srt's documentation names its own limitation — domain filtering does not inspect traffic contents, so a broad allowlist can carry an exfiltration out — because a sandbox has no notion of intent. Stroq's secret index does, and it knows which files on **this** machine hold credentials because it reads them to hash their values. Those paths become the deny list. The same files go into `denyWrite`, since one the agent cannot read but can truncate is still one it can destroy. Writes are allowed to the workspace, temp, `~/.stroq` (the hooks run inside the sandbox and have to write the audit chain) and the agent's own state directory; a write root wide enough to defeat the sandbox is refused out loud. Network stays at srt's deny-all until `--allow-domain` names hosts, which the output states plainly. Claude Code and Antigravity ship their own sandboxes, so for those this is an outer second boundary and the launcher says so. One limit found by running it rather than by reading about it: **on macOS `--sandbox` is for a headless invocation, not the TUI.** Inside srt 0.0.77's Seatbelt profile a child cannot enter raw mode — `tcsetattr` returns `EPERM`, so `setRawMode` throws and `stty` cannot read the line discipline — while a permissive `sandbox-exec` profile allows both, so it is srt's profile rather than Seatbelt and not something Stroq can widen from outside. `isatty` and the window size work. Every full-screen agent UI needs raw mode, so the launcher says this on stderr whenever a terminal is attached rather than letting it surface as an unexplained crash a second after launch. **`FileSecretIndex` gained a sealed mode, and without it `--sandbox` would have been a downgrade.** The credential files the sandbox denies are the files the index is built from, and a denied path is indistinguishable from a deleted one — `stat` on one returns `EPERM` under Seatbelt. Unsealed, the first lookup inside a sandboxed run rebuilds the index from nothing and writes that empty index over the real one, disarming the secret-egress guard for every session afterwards. `stroq run --sandbox` now refreshes the index before launching and sets `STROQ_SECRET_SOURCES_SEALED=1` for the run, so what is on disk is used as it stands. Measured: inside the sandbox, with `~/.aws/credentials` unreadable, `deny-secret-egress` still blocks a `curl` carrying that key and names the variable and the file; the same run without the seal leaves the index at zero entries. - **Google Antigravity is the seventh supported agent.** `stroq init --agent antigravity` writes `.agents/hooks.json` (or `~/.gemini/config/hooks.json` with `--user`) and gives Antigravity the same protection the other six have — content scan and session taint, provenance, the secret egress guard, the ordered policy and the hash-chained audit — through its native hooks, offline. Two things are genuinely new rather than another spelling of what the other adapters do. **Antigravity has `force_ask`, and Stroq uses it** rather than the plain `ask`: every Stroq `ask` exists because the context makes a normally-allowed action dangerous, and a standing `command(git *)` grant is exactly what would swallow that prompt. `deny_unless_prior_grant` is never used and `permissionOverrides` is never written, since both would make the outcome depend on grant state Stroq can neither see nor audit. And **`PreInvocation` is installed on** — the only place in any supported agent where Stroq can put text into the model's context, and here the only channel a taint has at all, because `PostToolUse`'s stdout must be `{}`. Once a session is tainted, each turn is preceded by one ephemeral statement of what was read, which rules it matched, and what Stroq will now do. It is never an instruction: text arriving unattributed ahead of the model's own reasoning and telling it what to do is structurally the thing Stroq exists to detect. The file name or URL it names is the one attacker-influenced value in it, so it is reduced to a path-shaped token with both ends kept. The rest is the shape the other adapters already have, with two limits worth stating up front. Antigravity's `PostToolUse` carries **no result at all** — same envelope as `PreToolUse` plus an optional `error` — so a poisoned command output, a fetched page and an MCP result cannot taint a session here; a file the agent read does, because Stroq opens it by path, and so does a failed call's error text. And its arguments are **PascalCase** (`CommandLine`, `AbsolutePath`, `TargetFile`, `Url`), which the shared field lists now read alongside the lowercase spellings every other agent sends — appended last so no existing agent's first candidate moves. Only `CommandLine` and `Cwd` are documented; the rest are read off the Windsurf/Cascade lineage, so a spelling guessed wrong surfaces as an `antigravity-unreadable-input` deny naming the keys rather than as a silent allow. What a failed or timed-out Antigravity hook does is undocumented, so the adapter never signals through an exit code: every verdict, its own errors included, is the documented deny object on stdout with exit 0. `.agents/hooks.json`, `~/.gemini/config/hooks.json` and `~/.gemini/antigravity-cli/settings.json` join the protected files for every agent. [docs/AGENTS.md](docs/AGENTS.md#google-antigravity) has the event table and every limit. ### Fixed - **Several checks silently found nothing on Windows.** Stroq installed and ran there and reported clean results, which for a security tool is worse than not running at all — `stroq exposure` printed the same reassuring report either way. Four checks are fixed, and none of them had been failing loudly. **Protected paths were matched with `/` as their only separator.** On Windows every path arrives with backslashes, so `.claude\settings.json`, `.cursor\hooks.json`, `.windsurf\hooks.json`, `.agents\hooks.json` and the rest matched nothing — self-tamper protection was not degraded there, it was absent, for every agent at once. The same held for the credential paths (`.ssh`, `.aws\credentials`, `.env`, `.kube\config`, `.config\gcloud`) and for `.git\config` / `.git\hooks`. Every separator in those patterns now accepts either spelling, and `normalizePathForMatch` folds a backslash before resolving `.` and `..`, so the evasions that function exists to close work on Windows too. Widening can only add matches and nothing allows an action _because_ a path matched, so the cost is a POSIX over-match on a file genuinely named with a backslash in it. Two holes closed along the way that were never Windows-only: `rm .claude\/settings.json` — a legal way to write the protected path in any POSIX shell — used to evade the gate entirely, and `SELF_CONFIG_FILE` is now matched case-insensitively, which fixes a **macOS** miss where a `Write` to `Library/Application Support/Windsurf/hooks.json` was compared against a lowercased copy of itself and never classified. **PowerShell reached the POSIX parser.** Two agents list `powershell` as a shell tool and both also expose dialect-neutral names (`run_command`, `terminal`) that are PowerShell on Windows, so the command text went to a classifier looking for `curl … | sh`, `rm -rf` and `base64 -d`. Every flagship dangerous shape measured as an empty class list and an `allow`. There is now a conservative PowerShell and cmd subset — download-and-execute, `-EncodedCommand`, `[Convert]::FromBase64String`, the fetch cmdlets and `certutil`/`bitsadmin`, recursive deletion outside the working tree, the disk cmdlets, `Get-ChildItem Env:`, and PowerShell's own write verbs against the protected-path list. It is deliberately **not** gated on a dialect flag: the adapter cannot reliably know which shell wrote a command, and a flag that guessed wrong would put the silent clean back one layer up. A new `shell.unparsed` class and an `ask-shell-unparsed` rule cover what the subset cannot read — `iex $payload`, `& $cmd`, a pipeline fed into `Invoke-Expression` from something that is not a fetch — so "I could not tell" is a verdict that reaches the user instead of a clean report. It fires on that construct alone and never on an unrecognised command. [docs/AGENTS.md](docs/AGENTS.md#the-powershell-subset) states what is still uncovered. **`.git/hooks/*` vanished from the repository surface.** The executable-bit test (`mode & 0o111`) is zero for every file on Windows, where there is no such bit and Git for Windows runs hooks anyway through its own `sh`, so `stroq inspect` reported a repository with no on-open execution surface. Existence is the test there; POSIX is untouched, since an unset bit really does mean git will not run the file. **A probed or wrapped MCP server leaked its children.** `child.kill('SIGTERM')` ends exactly one process on Windows, and almost every MCP server is launched through an `npx.cmd`/`uvx` shim that runs the real `node` or `python` below it — so a timed-out probe or a departed client left the server running with the environment it was handed. A shared `killChildTree` walks the tree with `taskkill /T` there and sends the signal as before on POSIX. Each fix injects the platform rather than reading it, following `childEnv`, so the Windows rules are exercised by the test suite on macOS and Linux. The install, spawn and hook-invocation paths are still untested on real Windows hardware. ## [0.13.0] - 2026-09-16 ### Added - **`stroq replay` — the causal history of a session.** Every guard, ours included, has so far answered one question: should this call be allowed. Once the session is over nobody could answer the question that actually matters after an incident — which piece of text the agent read turned into which action. `stroq replay` answers it. It groups a session into the content the agent read and, under each, the actions that traced back to it, naming the exact fragment that was carried over, how long afterwards, and the rule that stopped it. Actions with no untrusted origin are listed apart, so the graph shows what an attack looks like next to what ordinary work looks like. It adds no telemetry. Both halves of the link were already on disk: a `post` audit entry records what was read and how it scanned, a `pre` entry records the action plus the provenance evidence tying it back, so the command reconstructs the graph from the existing log and works on sessions recorded by earlier versions. `--json` emits the model, `--list` names the sessions in the log, and a positional argument replays one by id. One action commonly carries several atoms out of a single read — the host, the URL containing it, and the whole pipe-to-shell line — which is one causal link rather than three. The most specific atom represents the link and the rest are counted, so the graph shows causes rather than a row per pattern match. - **`stroq replay --last` reads the agent's own transcript, so it answers for sessions that ran before Stroq was installed.** The live hooks can only describe sessions they were present for, which left the question unanswerable exactly when it is first asked — after something has already gone wrong, by someone who has not installed anything yet. Claude Code records every session under `~/.claude/projects/`, and those records carry both halves the hooks would have seen: an assistant message's `tool_use` block is the call, the matching `tool_result` is the output that came back. Replaying them through the engine reconstructs the same graph retroactively. `--transcript ` replays a specific file. The replay runs against a throwaway home, exactly as `stroq attack` does: sessions, provenance, audit and the secret index all live under a temporary root that is removed afterwards. Analysing what already happened must never taint a live session or append to the chain that records real decisions. ### Fixed - **A filesystem path was extracted as a base64 atom, so ordinary work scored `origin.untrusted`.** `/` is in the base64 alphabet, which made a whole absolute path a single candidate token, and the path's own separators then satisfied the "contains a digit or symbol" test that was supposed to distinguish an encoded payload from a long word. `/Users/dev/Documents/stroq` is mixed case and not hex, so it passed. The cost was paid on every ordinary session: a path printed by one tool and then used in a later command matched as an atom carried over from untrusted output, and the action was raised to `ask`. Real base64 places a `/` about once every 64 characters, so its slash-free runs stay long, while a path is short word segments between separators. A candidate with at least two separators whose every segment is 16 characters or shorter is now treated as a path. Requiring two separators keeps the guard from firing on a genuine base64 token that happens to contain one slash, which is pinned by its own test. Found by `stroq replay` on its first run against a real recorded session: on that transcript the fix removed 139 of 261 `ask` decisions, none of which were attacks. `stroq bench` never measured this because it exercises the content scanner, not the provenance path. ### Fixed - **Three classification gaps, each of which left a protection the README describes silently inapplicable.** All three were recorded as known limits and are now closed; `SECURITY.md` no longer lists two of them as out of scope, because they are in it again. **A protected directory named as a whole was not self-tamper.** `rm -rf .claude/settings.json` was denied and `rm -rf .claude` — which destroys the same file, the hook entry and everything beside them — was classified as nothing at all. `SELF_CONFIG_FILE` protects files, and the protected-directory list was consulted only by the `find` write-intent rule. The write commands now consult it too, for a bare directory only: `rm -rf .claude`, `mv .cursor /tmp`, `chmod 000 .codex` and the glob form `rm -rf .windsurf/*` are denied, while `.claude/CLAUDE.md`, `.claude/skills/x` and `rm -rf .claude/plugins/cache/old` stay the ordinary work they are — the bare `.claude` match was narrowed once for exactly that reason and this does not undo it. `.github` is the exception that proves the rule: `.github/hooks` and `.github/copilot` are Stroq's and are covered, a bare `.github` is not, because deleting a CI workflow is not a claim this project makes. **A protected file reached by another spelling was not matched.** `.claude//settings.json`, `.claude/./settings.json` and, on macOS and Windows, `.CLAUDE/settings.json` all name the file that `.claude/settings.json` names, and all reached the filesystem while only the last was classified. Tool paths are now normalised lexically before matching — repeated slashes collapsed, `/./` removed, `..` resolved, case folded. Lexical rather than `realpath`: resolving on disk would follow symlinks and stat a path the agent chose, which is both slow on a hot path and a way to be pointed somewhere. A symlink into a protected directory therefore remains uncovered, and is recorded as a limit rather than implied away. **A bare credential directory carried no class.** `SECRET_PATH` required something after `/.ssh/` or `/.aws/`, so a `Read` or `Grep` pointed at the directory itself — which returns the key files' names, and for `Grep` their contents — was allowed in a tainted session. The bare form now matches, ending at the token so `/.sshconfig` and `myaws/notes.md` do not. Examined and deliberately not changed: `SELF_CONFIG_FILE` has no terminator, so a write to `hooks.json.bak` is also denied. That is an over-match rather than a hole, and adding a terminator to a fail-closed pattern to remove a mild false positive is the wrong trade. Also examined and found already closed: the post-phase audit summary of an MCP call, which the 2026-09-07 review recorded as unredacted — `redact()` runs over it and removes bearer tokens, provider-prefixed keys and values under credential-shaped keys. ## [0.12.1] - 2026-09-16 ### Fixed - **`@stroq/cli@0.12.0` on npm carries 0.11.0's code, and this release is how to get 0.12.0's.** The published tarball contains none of that release: no `config.git_exec`, no `stroq inspect`, no `stroq trust`, no hook watchdog, no install record. `npm view` reports the version, `stroq --version` prints it, and the usage text lists the old command set. Anyone who installed 0.12.0 has the label without the contents. The cause is packaging, not process. `packages/cli` ships `dist` through its `files` field and had no `prepublishOnly`, so `npm publish` packs whatever happens to be sitting in `dist` at that moment rather than building first. A publish from a working tree whose `dist` predates the merge therefore produces a correct version number over stale code, silently. `prepublishOnly` now runs the workspace build, so every publish path rebuilds — including the one that caused this. The tag-triggered workflow is not what went wrong: it builds from a clean checkout, and on finding 0.12.0 already on the registry it correctly skipped rather than trying to publish over it. The tarball attached to the v0.12.0 GitHub Release was built from `main` and does contain the release; for a few hours the two artifacts disagreed, which is the other reason to replace the npm one rather than leave it. 0.12.0 cannot be corrected in place: npm refuses a second publish of a version, and unpublishing burns the number permanently. It is deprecated on the registry instead, pointing here. ## [0.12.0] - 2026-09-16 ### Added - **`stroq trust ` — waive a false positive on a file's exact content, pinned to its bytes.** `stroq untaint` clears a session and forgets, so re-reading the same file re-taints it. For a false positive on something the agent opens every session that is not an annoyance but a session tainted from the first minute, every time, and the way people escape that is by removing Stroq. An entry records the file's sha256, and the engine waives a verdict only when the source and the digest both match, so trusting a README today says nothing about the README in tomorrow's pull request. An exemption list is the first thing an attacker wants to write to, so three things hold it down. It is pinned to the bytes, as above. It lives in `~/.stroq/trust.json`, which `config.self` already covers, so a tainted agent asking to add itself an exemption is denied like any other edit to Stroq's own configuration. And every waiver is written into the audit chain next to the verdict it waived — `stroq log` prints `suspect(1.00) trusted` rather than a clean line, and `stroq trust --list` shows each entry with the rules it waives. An exemption nobody can read back is a hole rather than a setting. The scan verdict is left as the rules stated it; only its consequence changes. Waiving a taint is not waiving the policy: the classes denied at any taint are unaffected, so trusting the file that mentioned `curl … | sh` does not let the agent run it. `stroq trust` also refuses to record a file no rule flags, which would waive nothing today and become a blanket exemption the day the file changes. - **`stroq inspect []` — read what a repository runs before you open it.** `stroq exposure` reads the directory you are already in; this reads one you have not opened yet, which for one class of attack is the only moment that helps. It prints the same two groups the exposure block reports — what runs before you could approve anything, and the ordinary on-open list — and exits 1 only on the first. `--json` emits the record. The command exists because a hook cannot do this job, and the README says so rather than implying otherwise: agents run `git status` at startup to orient themselves, on Claude Code that happens before the workspace-trust prompt, and a `SessionStart` hook is gated on that same prompt. - **`stroq inspect --env` prints the two git settings that neutralise the shape it reports.** `core.fsmonitor=false` and `safe.bareRepository=explicit`, exported as `GIT_CONFIG_*`, which git applies at command scope — above anything a repository's own config says. Measured against git 2.53.0 and pinned in the test suite against real git rather than asserted in a comment: with `core.fsmonitor` pointing at a script, a plain `git status` runs it twice and the same command under these variables does not run it at all; a nested bare repository that `git rev-parse` otherwise treats as a repository is refused outright. Deliberately only those two — `core.hooksPath` is how husky installs itself, and `core.pager`, `core.editor` and `diff.external` are ordinary preferences, so overriding them would break real work to close a narrower hole than the report already names. - **A watchdog in every hook invocation, because an agent's own timeout is an allow.** Claude Code cancels a timed-out hook and lets the tool call continue through the normal permission flow; Codex reports a hook failure and proceeds; Copilot discards the late deny even on `preToolUse`. A Stroq that runs long therefore loses its verdict rather than merely its explanation, and until now nothing inside Stroq bounded a single invocation — the only wall-clock budget in the decision path was the scanner's 500 ms, and everything else was delegated to the host. `runHook` now races the handler against a deadline of 60% of the timeout the installer wrote for that same agent, derived from the same constant so the two cannot drift, and answers with that adapter's own fail-closed output: a JSON deny on Claude Code, exit 2 with the reason on stderr for Codex and Windsurf, exit 2 on Copilot `pre`. The answer is marked `timedOut`, and the command layer then flushes both streams and exits rather than returning — the stuck work is not cancellable and would otherwise hold the process open past its own verdict, until the agent's timeout fired and allowed the call anyway. - **`stroq init` records what it installed, and `stroq doctor` checks the entry is still that.** Every check until now asked whether some handler _claims_ to be Stroq: `isStroqHandler` matches a command ending in ` hook claude-code`, which an entry rewritten to `/tmp/evil hook claude-code` satisfies. That stopped being theoretical with the ChainDrop npm worm (2026-08-04), whose payload writes hook entries into Claude Code's own settings and into VS Code config. `init` now writes the command it installed to `~/.stroq/install.json` (0600, one entry per agent and scope, nothing about the machine), and `doctor` fails that agent's line with `CHANGED since stroq init` when the config no longer carries it — matched against the file's raw text, so one check covers JSON and TOML, and against both the escaped and unescaped spellings of the quoted command. Advisory by construction, and documented as such: an attacker who can rewrite the agent's config can rewrite the record beside it. What it removes is the silent case, where the agent reports a hook, the user believes they are covered, and something else entirely runs on every tool call. An install predating the record reads as `unrecorded` rather than as drift, as does a record whose version this build does not understand — reporting every hook as changed because the file grew a field would train people to ignore the one time it matters. - **`stroq exposure` now reads the repository in front of you, not just the machine under it.** A new block reports what this checkout runs when you open it, split in two, and the split is the design. Raised as findings: execution a repository carries in its own metadata and fires before anyone approves anything — a `.git/config` key whose value git runs, an `include`/`includeIf` pointing outside the checkout, a `.gitattributes` driver whose command that same config defines, a `devcontainer.json` `initializeCommand` (which runs on the host, where the container it configures gives it no isolation), and a bare repository committed as plain files, which survives an ordinary clone rather than needing a zip to travel. Counted and listed under `--verbose` but never raised: `.git/hooks`, `.husky`, in-container devcontainer commands, `.envrc`, and `package.json` install scripts. Those are ordinary; this command exits 1 on any finding, and a check that fails on every repository with a pre-commit hook is a check people turn off. `core.fsmonitor = true` is git's own built-in monitor and runs no command, so only a value naming a program is reported — the boolean would otherwise put a critical finding on everyone who turned the feature on. `.git/config` is parsed directly rather than read through `git config`, which would execute the repository's own configuration to answer the question. The walk that looks for nested bare repositories skips `node_modules` and friends and is capped, with the report saying so when it stops early. `--share` carries the finding kinds and the on-open count and nothing else: a kind is a fixed vocabulary, a path is the user's disk. What this does not do is stop the attack from firing. On Claude Code the startup `git status` runs before the workspace-trust prompt and a `SessionStart` hook is gated on that prompt, so no hook Stroq can install gets in front of it. Run `stroq exposure` on a repository before opening it with an agent; that ordering is the mitigation, and the README says so rather than implying the hook covers it. - **A fifteenth action class, `config.git_exec`, denied at any taint: the agent installing repository-supplied execution.** Git runs the value of a small set of configuration keys as a command — `core.fsmonitor` during an index refresh, `core.hooksPath`, `core.sshCommand`, `core.pager`, `diff.external`, `diff.*.textconv`, `filter.*.clean|smudge|process`, `credential.helper`, `alias.*`, and the `include.path`/`includeIf` pair that points git at a config file carrying them. Until now Stroq classified none of this: `git config` was not parsed anywhere, and `.git/config`, `.git/hooks/*`, `.gitattributes`, `.gitmodules`, `.husky`, `.devcontainer` and `.envrc` were absent from every path pattern, so an agent acting on a poisoned file could install persistence that survives the session and Stroq would record a plain allow. Both routes are covered: the shell one (`git config …`, `git -c key=…`, and a redirect or copy into one of those files) and the tool one, a `Write`/`Edit` whose path is one of them, which never runs a command for a hook to read. What it does not claim is the attack that motivated it. GitSpawn (Manifold Security, 2026-09-01) fires when the repository already carries the key and the agent merely orients itself with `git status` — on Claude Code that happens before the workspace-trust prompt, and its `SessionStart` hook is itself gated on that prompt (`Skipping SessionStart:startup hook execution - workspace trust not accepted`), so no hook Stroq can install runs earlier. This class catches the other direction, an agent that has read something untrusted and is now asked to install the key. Reads stay allowed throughout: `git config --get core.fsmonitor`, `--list` and `cat .git/config` are ordinary reads, and so are `git config user.email` and every other key outside the executable set. - **`rules/atr-overrides.yaml` — a way to fix one condition of a vendored rule without forking the vendored file or losing the rule.** `rules/atr` is imported verbatim from `agent-threat-rules` and carries a "do not edit by hand" header, which until now left exactly one remedy for a vendored rule that misfires: `rules/atr-disabled.json`, which removes the whole rule. That is the wrong instrument for a rule that is right about its threat and wrong about one character class — disabling `ATR-2026-00142` to stop it reading the "ps" inside "https" would also stop it catching a key exfiltrated after a real "P.S.". An entry replaces one condition's regex at build time, so the vendored file stays byte-identical to upstream and `scripts/import-atr-rules.sh` can still be re-run at any version. The load-bearing field is `from`: it must equal the value currently parsed out of the vendored rule, or the build fails naming both strings. A re-import that changes an overridden pattern is then a loud failure rather than a silently reapplied stale patch — upstream may have fixed the defect itself, or moved it somewhere the override no longer addresses, and either way a human has to look. Every other failure mode is a build error too, for the same reason: an unknown rule id, an out-of-range condition index, a no-op replacement, a malformed entry, or an override aimed at a `STROQ-` rule, which is ours to edit in place. ### Fixed - **The hero animation on stroq.dev has been frozen since it shipped, because the site's own Content-Security-Policy blocked it.** `style-src 'self'` with no `'unsafe-inline'` drops every `style=""` attribute, and the eight packet circles carried their whole geometry that way — `--dx`, `--dy`, `--pd`. Blocked attribute, unset custom properties, `translate(var(--dx), var(--dy))` invalid, every packet parked at the start of its line for as long as the page was open. The same policy flattened the incident bar, whose two segments were proportioned with `style="flex-grow:15"` and `style="flex-grow:5"`. Nothing reported it: a blocked style attribute raises no console error the author sees, the page renders, and every local preview is served without the header, so the animation worked on every machine that built it and on none that visited it. The geometry moved into `site/styles.css` behind per-packet classes and the markup now has no inline style at all. `site/test/csp-safe.test.ts` pins the class of bug rather than this instance: no `style=""` attribute and no `