Skip to content
AddHunt
MCP servers

Stroq

Local guard for secrets used by AI coding agents

Open source

  • Open source
  • Licence: Apache-2.0

In short

Stroq is an open-source command-line tool that hooks into AI coding agents, blocks outbound actions carrying known secrets and reports where keys have travelled. It is meant for developers who run Claude Code, Codex CLI or Cursor on projects that hold credentials.

What you get

  • Two agent hooks checked against a deterministic local policy
  • Blocks outbound calls that carry the value of a known secret
  • Session scanning for Claude Code, Codex CLI and Cursor
  • Decoding of base64, hex and URL encoding before matching
  • Editable YAML policy where the first matching rule wins
  • Runs locally with no telemetry

The details

Stroq sits between an AI coding agent and the actions it takes. It installs two hooks and evaluates each tool call against a deterministic policy, with no model in the loop and no network calls on the hook's critical path. It can also scan past Claude Code, Codex CLI and Cursor sessions to show where a key turned up, for example in the result of a file read or in the arguments of a shell command.

How checks work

  • Normalization: zero-width characters are removed, look-alike characters are folded, and base64, hex or URL encoding is decoded before matching.
  • Provenance: Stroq can point to the earlier tool output that introduced a package name, URL or command fragment later used in an action.
  • Secret egress guard: secrets are indexed as salted hashes, and any outbound call that carries one is denied with the variable and file named, never the value.

Policy

The default policy ships with 21 rules covering classes such as secret egress, canary files, encoded shell execution, external git pushes and edits to the agent's own configuration. The first matching rule decides, and the policy file can be copied into the user's home directory and adjusted.

Stroq runs locally, sends no telemetry and is released under the Apache-2.0 license. Setup starts with a single npx command.

Alternatives to Stroq

All alternatives

Questions

Does Stroq send my secrets anywhere to check them?

No. Secrets are indexed locally as salted hashes, the hooks make no network calls on their main path, and the project states that it collects no telemetry.

Which coding agents can it work with?

The site names Claude Code, Codex CLI and Cursor as the agents whose sessions Stroq can scan.

Can the rules be changed?

Yes. The default policy is a YAML file that can be copied into the Stroq folder in the home directory and edited; the first rule that matches an action decides the outcome.

More like this