Audit coding actions and credential exposure
Stroq traces coding commands to previously read text, audits credential exposure, and filters tool calls through local hooks.
1.0.0Add to Favorites
Why it matters
Inspect coding-session evidence and apply local tool-call checks to reduce credential exposure and influence from untrusted read text.
Outcomes
What it gets done
Trace commands back to read content
Inspect credential exposure in session records
Replay existing transcripts against current policy
Configure and test tool-call hooks
Source
Get it from source
Spark does not host a copy of it.
Open sourceReports
Agent outcome reports
No reports yet
Overview
Stroq links coding-session actions to previously read text and checks transcripts for credential exposure. Local hooks can evaluate subsequent tool calls, while a console exposes evidence and policy decisions. Use it to inspect existing session records or configure checks before future tool calls. Account for host-dependent hook visibility and text-level matching limits.
What it does
Stroq audits local coding sessions to connect commands with text an agent previously read and to identify credential exposure. Its session card covers the last 30 days, counts actions, highlights moments worth inspecting, and provides a stroq show command for the evidence behind each finding. The initial scan reads session records, key files, and working folders; it prints key names rather than values, sends nothing, and writes only a small cache under ~/.stroq.
Live protection is a separate step. Stroq's hooks judge tool calls before execution, denying supported outbound calls that contain known secrets and commands such as curl | sh. When a command repeats text the agent read, the hooks can ask for confirmation while naming that text. Native hooks cover Claude Code, Cursor, Codex, Copilot CLI, Windsurf, and Antigravity; OpenClaw uses a plugin, and a stdio MCP proxy is also available.
When to use - and when NOT to
Use retrospective checks to inspect sessions recorded before Stroq was installed. stroq replay connects earlier tool output with later actions, while --all examines sessions from the last 30 days. Replay executes nothing and sends nothing. Its verdicts apply today's policy rather than reconstructing the decisions made during the original session.
stroq sent compares Claude Code, Codex CLI, and Cursor transcripts with local credentials. Findings distinguish keys sent to another company, possibly sent, seen by the model, used with their own service, or blocked before execution. It identifies a send only when the key appears in the sending command. Scripts, files, and variables can carry credentials without exposing them in that command; old, rotated, or unknown values may be missed. A transcript match alone does not prove delivery to a model provider.
Treat Stroq as a filter rather than a sandbox. Hook visibility depends on the host and version, and provenance matching operates on text. Commands composed from scratch do not trace back to a read source. In Claude Code, confirmation for a copied value normally occurs once per session, with an exception when the session has started background work.
Capabilities
The local console provides five screens. Check opens the session card and its evidence; Live lists recorded decisions with the originating content, action, decision, and rule. Agents previews exact settings changes, shows when Stroq was last consulted, and identifies settings that weaken protection. Skills & MCP inventories each agent's skills and servers, their origins, rule matches, and changes since the previous inspection. Rules lets you try an action without executing it, preview and test policy changes, and undo changes through their history.
Configured hooks do not establish that calls actually reach Stroq. Test hook runs a single hook offline, and Live shows recorded calls. The console starts no coding agent. Policy or settings changes require confirmation of a preview; checks are saved under ~/.stroq. The console listens only on 127.0.0.1, uses no account or telemetry, and requires the full printed link containing its fresh startup key. Hooks make no outbound network calls; an older Task Lock hook communicates only with its local parent controller.
For policy exercises, stroq attack runs 36 public-report and synthetic attacks in a throwaway home. These are sandbox exercises, rather than evidence about a user's own machine.
How to install
Start the session card with Node.js 22 or newer:
npx @stroq/cli
Use stroq init to add hooks for subsequent sessions and stroq uninstall to remove Stroq. The console can add hooks on macOS or Linux; Windows users use stroq init. stroq why explains a stopped action, while stroq help --all lists additional commands. Stroq is licensed under Apache-2.0.
Source README
Who is really in charge of your agent?
Stroq reads your own Claude Code and Codex sessions and shows how many commands came from text your agent read, and which keys left your machine.

An example: a made-up machine with made-up sessions, keys and hosts. Hoo is Stroq's owl. Your card shows your own sessions.
npx @stroq/cli
It reads your last 30 days of sessions, your key files and the folders your agent worked in; prints key names, never values; writes nothing but a small cache under ~/.stroq; and sends nothing. No account, no telemetry.
npx @stroq/cli a card of your own sessions, like the one above
npx @stroq/cli init stop it next time: guard your agent
npx @stroq/cli why why an action was stopped
npx @stroq/cli attack watch Stroq stop 36 known attacks, in a sandbox
npx @stroq/cli uninstall remove Stroq
Every moment on the card has a stroq show line that prints the evidence behind it (npx @stroq/cli show 1). stroq help --all lists the other commands. Needs Node.js 22 or newer. Apache-2.0.
Beyond the card
Stroq is a local security platform for AI coding agents: Claude Code, Cursor, Codex CLI and others. Its hooks judge every tool call before it runs. They deny curl | sh and outbound calls that carry a known secret from your machine, and they ask you first when a command repeats text the agent read, naming that text. The console shows which agents actually ask Stroq, and every decision with its reason. Sessions you already had can be checked too, without installing anything.
npx @stroq/cli console # the console: a private page on 127.0.0.1
npx @stroq/cli replay --all # your Claude Code sessions of the last 30 days against the policy; no hooks needed
npx @stroq/cli sent # did your agent pass your keys on? key names, never values
npx @stroq/cli init # hook into your agent and guard the next session

A made-up machine: made-up sessions, keys and hosts. Nothing was executed.
The console
Check: the card of stroq, made by the same code. Each moment opens with its evidence, under it one line for each agent.
Live: recorded decisions as they happen. A row opens into its chain: what the agent read, what it did, the decision, the rule.
Agents: add or remove Stroq's hooks, with the exact file change shown first. When Stroq was last asked, and which of an agent's settings weaken it.
Skills & MCP: every skill and MCP server by agent: where it came from, what the rules matched in it, what changed since you last looked.
The fifth screen is Rules: try an action without running it, turn rules on with a preview and a test, the history with an undo, and the rules reference. Connected means Stroq's hooks are in the agent's settings, not that the agent calls them: Test hook and Live show that.
Screens from a build just before 0.30.0, reading a made-up machine: made-up sessions, keys and hosts. Nothing was executed.
npx @stroq/cli console # a private page on 127.0.0.1
npx @stroq/cli console --workspace /path/to/repo # the project it should look at
Open the whole link it prints: it carries a key that is new each time the console starts. The console reads what Stroq already records on this machine. It changes an agent's settings or Stroq's policy only after you confirm a preview of that change; checks you run are saved under ~/.stroq.
It listens only on 127.0.0.1, needs no account and has no telemetry. Nothing in it starts your agent: Test hook runs the hook once, offline. Adding hooks from the console needs macOS or Linux; on Windows use stroq init. Details and limits: console guide.
From a source checkout:
pnpm install --frozen-lockfile
pnpm --dir console install --ignore-workspace --frozen-lockfile
pnpm platform:build
pnpm platform --workspace /path/to/repo
In the terminal

Output of the 0.29.0 CLI on a made-up Claude Code transcript of the same story; the path is shortened.
stroq replay reads the agent's own transcript, so it works on sessions from before Stroq was installed: which content the agent read, and which later actions came out of it. --all goes through every session of the last 30 days and says which to open. Nothing runs and nothing is sent; the verdicts are today's policy's, not a record of what happened at the time.
stroq sent compares your Claude Code, Codex CLI and Cursor sessions with the credentials on your machine and says where each key went: sent to another company, maybe sent, seen by the AI, used with its own service, or blocked before it ran. It prints names and sources, never values. Start with the session secret scan walkthrough (no session yet? try it with a made-up key).
What a stroq sent finding looks like
Made-up keys, the built CLI's output, trimmed:
stroq sent: did your AI agent pass your keys on?
6 of your 6 keys appear in your agent sessions: 2 sent to another company, 1 maybe sent, 1 seen by the AI, 1 used with its own service, 1 blocked before it ran.
Checked 3 sessions (Claude Code 2, Codex 1), 2026-10-02 to 2026-10-19.
Compared with 6 keys: ~/.aws/credentials, ~/.npmrc, ~/work/shop/.env, ~/work/api/.env.
SENT TO ANOTHER COMPANY: rotate these today (2)
1. STRIPE_SECRET_KEY from ~/work/shop/.env
went to collector.example, in a curl command
when 2026-10-11 14:02 UTC · Claude Code · ~/work/shop
do revoke it at https://dashboard.stripe.com/apikeys, then update ~/work/shop/.env
SEEN BY THE AI: your agent's model saw these keys (1)
4. aws_secret_access_key from ~/.aws/credentials
seen in the output of a Read of ~/.aws/credentials
when 2026-10-02 09:42 UTC · Claude Code · ~/work/api
note Not ruled out: 2 later commands in that session could reach the network.
do your agent's model saw it; rotate it if that matters: https://console.aws.amazon.com/iam/home#/security_credentials
Stroq names a send only when it sees the key in the command that sent it. A script, a file or a variable can carry a key out without showing it.
stroq attack runs 36 attacks, from public reports and synthetic cells, against your policy in a throwaway home: on 0.30.0, 15 are denied, 21 are asked about, 0 pass through.
What it covers and where it stops
- Before each action. Native hooks for Claude Code, Cursor, Codex, Copilot CLI, Windsurf and Antigravity, a plugin for OpenClaw, and a stdio MCP proxy. Supported outbound calls containing a known secret can be denied; provenance ties later actions to the tool output they repeat. A question about a value copied from text the agent read is asked once per session in Claude Code, unless the session has started something in the background.
- After the fact.
replayandsentread local session records, including sessions from before Stroq was installed. Old, rotated or unknown values may be missed, and a key that did not show in a command may still have left in a script, a file or a variable. A local transcript match does not by itself prove delivery to a model provider. - Local. No outbound network calls from the hooks; the hook of an older Task Lock run speaks only to its local parent controller. No telemetry.
- Limits. A hook sees only what the host sends it, and that differs by agent and version. Matching is text-level, so a command the model writes from scratch does not trace back to a source. It is a filter, not a sandbox. Read the integration limits before relying on a live hook.
Docs
- Guide: everything, section by section. Install · Commands · How it works · Guarantees and limits
- Per-agent details: what each agent's hooks allow, and every documented limit
- False positives · Attack coverage · Cloak vs AgentCloak
- Security · Changelog · Contributing
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.