Who it is forA security analyst drowning in high-entropy string alerts.
The problemNoisy scanners get ignored, so real leaks slip through.
The outcomeA labeled baseline, a report of real secrets to migrate, and a quieter scan.
What you need first
- Python with pip (`pip install detect-secrets`) or Homebrew (`brew install detect-secrets`)
- A git repository to scan
- Optional: the pre-commit framework for the hook
Steps
- Label results with
detect-secrets audit .secrets.baseline - Print a report of findings with the audit --report option, adding --only-real to list real secrets
- List plugins with
detect-secrets scan --list-all-pluginsand disable noisy ones withdetect-secrets scan --disable-plugin KeywordDetector --disable-plugin AWSKeyDetector - Skip known patterns, for example
detect-secrets scan --exclude-files '.*\.signature$'
Prompt for your agent
Using Yelp/detect-secrets, audit <my .secrets.baseline> with `detect-secrets audit .secrets.baseline`, then propose plugin and exclude settings that remove the false positives you labeled.
Caveat. This is not a sure-fire solution; the README says only developer education truly prevents secrets in code.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for Yelp/detect-secrets and "Audit findings and cut false positives"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer