secretguard

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Command secretguard is an example agenthooks consumer: it scans every tool call's input for credential-shaped strings before execution. On a hit it forces the provider's confirmation prompt, so the user can accept the risk and continue — or reject and block the call. On providers/events without a confirmation prompt (Codex, Cursor's generic preToolUse, OpenCode) the call is blocked outright, because letting a detected secret through unchallenged is the one outcome this hook exists to prevent.

Install it for a project with the install package, or by hand, e.g. Claude Code .claude/settings.json:

{"hooks": {"PreToolUse": [{"matcher": "", "hooks": [
  {"type": "command", "command": "secretguard agenthooks run --provider=claude-code", "timeout": 10}
]}]}}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL