2026-03-18

Secrets detection: catching a key before it leaves your machine

The most expensive mistake an AI agent can make is a fast one: pasting a real API key into a command, a commit, or a file write, and having it gone before anyone notices. The secrets rule pack exists to catch that specific moment — before the tool call executes, not in a nightly scan after the fact.

What it actually matches

Known credential shapes: cloud provider access keys, common SaaS API key formats, private key blocks, connection strings with embedded passwords. Each pattern is a real, versioned rule, not a generic “looks like a password” heuristic — that’s what keeps the false-positive rate low enough to run in enforce mode without becoming background noise you learn to ignore.

Why “before it leaves your machine” is the whole design

A secrets scanner that runs after a git push has already lost. This one sits in the tool-call path itself: Claude Code or Cowork asks to run a command or write a file, the rule pack evaluates it, and only then does the call proceed. Shadow mode logs what it would have caught; enforcement blocks it outright.

Where to see it work

Every match shows up in the local dashboard’s Overview and Sessions pages, and the Rules browser lets you see exactly which pattern fired and flip it between shadow and enforce, one rule at a time — not all-or-nothing.

← Back to blog