Credentials. The baseline stores hashed secrets and their locations; treat the file as sensitive and rotate any real secret it finds.
Who it is forA security engineer inheriting a large repository with unknown leaked keys.
The problemCleaning all historical secrets at once is too big a job to start with.
The outcomeA .secrets.baseline file listing current potential secrets to roll and migrate.
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
- Install with
pip install detect-secrets - Run
detect-secrets scan > .secrets.baselinein the repository - Include untracked files with
detect-secrets scan test_data/ --all-files > .secrets.baselinewhen needed - Update it later with
detect-secrets scan --baseline .secrets.baseline
Prompt for your agent
Using Yelp/detect-secrets, run `detect-secrets scan > .secrets.baseline` in <my repo> and summarize how many potential secrets were found per plugin type.
Caveat. This card is written from the Yelp/detect-secrets README, not from a test run by Deduped. Before you start, make sure you have Python with pip or Homebrew. Check the repo for newer instructions before you rely on these steps.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for Yelp/detect-secrets and "Create a baseline of secrets already in your repo"
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