{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "yelp-detect-secrets--create-a-secrets-baseline-with-detect-secrets",
 "repo": "Yelp/detect-secrets",
 "repo_url": "https://github.com/Yelp/detect-secrets",
 "repo_slug": "yelp-detect-secrets",
 "title": "Create a baseline of secrets already in your repo",
 "page_title": "How to create a baseline of secrets already in your repo with Detect Secrets",
 "summary": "Scan the repository once and save every potential secret to .secrets.baseline as your checklist.",
 "who": "A security engineer inheriting a large repository with unknown leaked keys.",
 "problem": "Cleaning all historical secrets at once is too big a job to start with.",
 "outcome": "A .secrets.baseline file listing current potential secrets to roll and migrate.",
 "steps": [
  "Install with `pip install detect-secrets`",
  "Run `detect-secrets scan > .secrets.baseline` in the repository",
  "Include untracked files with `detect-secrets scan test_data/ --all-files > .secrets.baseline` when needed",
  "Update it later with `detect-secrets scan --baseline .secrets.baseline`"
 ],
 "agent_prompt": "Using Yelp/detect-secrets, run `detect-secrets scan > .secrets.baseline` in <my repo> and summarize how many potential secrets were found per plugin type.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Beginner",
 "time": "15 minutes",
 "basis": "readme",
 "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.",
 "category": "Security and science",
 "tags": [
  "Security and science"
 ],
 "lang": "",
 "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "The baseline stores hashed secrets and their locations; treat the file as sensitive and rotate any real secret it finds."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/yelp-detect-secrets/create-a-secrets-baseline-with-detect-secrets/",
 "md": "https://dedupedai.com/use-cases/yelp-detect-secrets/create-a-secrets-baseline-with-detect-secrets/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/yelp-detect-secrets--create-a-secrets-baseline-with-detect-secrets.json",
 "api_version": "v1"
}
