Docs / Security mechanisms & rules

Three layers, all deterministic

Rule packs evaluate a single tool call. Hooks decide when each rule pack (and every token-saving advisor) runs in the Claude Code lifecycle. The MCP scan pipeline, built but not running as a hosted service, evaluates a server before you add it. None of the three is a model call — same input, same verdict, every time, which is what makes a false-positive override and an audit trail both possible.

Rule packs (8)

Every rule id is <prefix>.<name>. Full illustrative examples live on the rule reference page; this table adds the source module each pack actually runs from.

Enforcement points: hooks

Rule packs need somewhere to run: the engine's hooks, each wired to a Claude Code lifecycle event. On a fresh install 9 security guards run there, out of 23 mechanisms in all; every other security guard, including the PII, malicious-URL and input-anomaly rule packs above, waits behind security.experimental. See Hooks for the lifecycle events and the default-on list.

Before it's even added: MCP Scan & Verify

A separate pipeline, the MCP scan service, evaluates an MCP server itself, not a tool call it makes. It exists in the codebase but no hosted scan runs it, so it is not something you can use today: MCP Scan & Verify is not available.

Shadow mode vs. enforce

Every rule and every hook has two states: shadow (logs a would-be verdict, never blocks) and enforce (can actually deny or ask). New installs start entirely in shadow mode. The rules browser shows both states per rule, and pinkyai profile switches between coarse strict/standard/relaxed baselines.

Next: Token savings →