Claude Code hook

Agent Security

Hooks for Claude Code and Cursor for secrets scanning

78 stars 4 forksHooks Plugin marketplace Source

Install

Inside Claude Code
/plugin marketplace add mintmcp/agent-security

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/mintmcp/agent-security.git

From the README

Security plugins for Claude Code and Cursor
This repository currently provides a secrets scanner plugin.

Motivation

Coding agents are powerful, but we've repeatedly seen them read and propagate sensitive data during everyday work. That can be acceptable for casual "vibe coding" experiments, but it's not acceptable for production software engineering. We built this to make accidental leakage much harder: a standalone, local-first scanner with minimal footprint (no external dependencies, regex-only), running as editor/agent hooks entirely on your machine, and easy to set up so teams can adopt it without friction.

Install

Claude Code Plugin Marketplace

Install via the Claude Code plugin marketplace:

PyPI (manual hooks)

Add hooks to ~/.claude/settings.json if using PyPI:

Cursor

Copy examples/configs/cursor-hooks.json to ~/.cursor/hooks.json or configure similarly:

Repository Layout

Notes

- Pre hooks block when secrets are detected. Post hooks print warnings.
- No external dependencies. The scanner uses only Python's built-in regexes and simple pattern matching.
- Runs completely locally. No code, prompts, or files leave your system.
- Curious how it works? See plugins/secrets_scanner/hooks/secrets_scanner_hook.py for the core implementation and patterns.
- No telemetry by default. For org-wide visibility and governance (dashboards, metrics, alerting), see https://mintmcp.com.

License

Apache License 2.0. See LICENSE.

Acknowledgements

Regex patterns were informed by or adapted from detect-secrets (Apache 2.0).
Read the full README on GitHub

How hooks work

  • Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
  • They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
  • A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Claude Code docs

Details

Type
Hooks
Language
Python
License
Apache-2.0
Last updated
21 October 2025
Topics
claudecodecursorhookspluginssecretsecurity

FAQ

What is Agent Security?

Hooks for Claude Code and Cursor for secrets scanning It is a hook for Claude Code, from mintmcp/agent-security on GitHub.

How do I install Agent Security?

Run /plugin marketplace add mintmcp/agent-security inside Claude Code, then follow the setup in the README.

Is Agent Security popular?

mintmcp/agent-security has 78 GitHub stars and 4 forks. It was last updated on 21 October 2025.

More hooks

Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.