DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to use Detect Secrets: what you can do with it

What is Detect Secrets? detect-secrets finds secrets such as API keys, tokens and private keys in a code base. It records the secrets already present in a baseline file, blocks new ones with a pre-commit hook that scans only changed files, lets you audit and label findings, and offers plugins and filters to tune signal to noise.

How do I use it? Install with pip install detect-secrets; then run detect-secrets scan > .secrets.baseline in the repository; Include untracked files with detect-secrets scan test_data/ --all-files > .secrets.baseline when needed. Full steps below.

Trended earlier

View repo on GitHub

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer

3 use cases

Quick start with Detect Secrets

  1. Check you have what it needs: 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.
  2. Open Yelp/detect-secrets on GitHub and read the README and license.
  3. Install with pip install detect-secrets
  4. Run detect-secrets scan > .secrets.baseline in the repository
  5. Include untracked files with detect-secrets scan test_data/ --all-files > .secrets.baseline when needed
  6. Update it later with detect-secrets scan --baseline .secrets.baseline

These steps come from our top use case, Create a baseline of secrets already in your repo, which also has a copy-paste agent prompt.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for Yelp/detect-secrets

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Best AI repos for Security and science

About this repo

  • Who it is forEngineering and security teams who want to stop new credentials landing in git without first cleaning every old one.
  • Why it is hot4.7k stars, talked about in 2 AI sources we track
  • Sourcegithub.com/Yelp/detect-secrets ยท Back to Hot repos

Requirements

  • 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

Add this badge to your README

Maintain Detect Secrets? Show readers where to find these use cases. Use cases on Deduped

Markdown

[![Use cases on Deduped](https://dedupedai.com/badge/Yelp/detect-secrets.svg)](https://dedupedai.com/use-cases/yelp-detect-secrets/?utm_source=github&utm_medium=badge&utm_campaign=Yelp-detect-secrets)

HTML

<a href="https://dedupedai.com/use-cases/yelp-detect-secrets/?utm_source=github&amp;utm_medium=badge&amp;utm_campaign=Yelp-detect-secrets"><img src="https://dedupedai.com/badge/Yelp/detect-secrets.svg" alt="Use cases on Deduped" height="20"></a>

A static image, no tracking script. About the badge

Questions about Detect Secrets

What is Detect Secrets?

detect-secrets finds secrets such as API keys, tokens and private keys in a code base. It records the secrets already present in a baseline file, blocks new ones with a pre-commit hook that scans only changed files, lets you audit and label findings, and offers plugins and filters to tune signal to noise. It is an open-source project on GitHub: https://github.com/Yelp/detect-secrets.

How do I use Detect Secrets?

Install with pip install detect-secrets; then run detect-secrets scan > .secrets.baseline in the repository; Include untracked files with detect-secrets scan test_data/ --all-files > .secrets.baseline when needed. The use cases on this page give the full steps and a copy-paste agent prompt for each job.

Who is Detect Secrets for?

Engineering and security teams who want to stop new credentials landing in git without first cleaning every old one.

What can I do with Detect Secrets?

3 use cases so far, for example: Create a baseline of secrets already in your repo; Block new secrets at commit time; Audit findings and cut false positives. Each has steps and a copy-paste agent prompt.

What do I need to run Detect Secrets?

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.

What are alternatives to Detect Secrets?

Other hot AI repos in Security and science: Failproofai, Codex Security, Chgnet, Semgrep, Mace.

Is Detect Secrets safe to run?

Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.