yelp/detect-secrets

An enterprise friendly way of detecting and preventing secrets in code.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 55 minutes ago
Added to GitGenius on September 14th, 2026
Created on December 5th, 2017
Open Issues & Pull Requests: 183 (+0)
GitHub issues: Enabled
Number of forks: 568
Total Stargazers: 4,635 (+0)
Total Subscribers: 49 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 28.1 days
Mean response time: 194.6 days
90th percentile: 729.1 days
Tracked items: 16

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 28
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 509 days
Stale 30+ days: 27
Stale 90+ days: 23

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (3)
  • triaged (3)
  • good first issue (2)
  • help wanted (2)
  • needs more info (2)
  • pending (2)
  • P2 (1)
  • P3 (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

detect-secrets is a Python tool for detecting and preventing secrets in code.

The tool addresses the challenge of managing secrets in large codebases by taking an enterprise-focused approach that acknowledges existing secrets while preventing new ones from being introduced. Rather than attempting to scan entire repositories or git history, it runs periodic diffs against heuristically crafted regex patterns to identify newly committed secrets. This strategy avoids the overhead of comprehensive historical scans while establishing a baseline of currently known secrets, creating a separation of concerns that allows teams to prevent secret sprawl without immediately addressing legacy secrets.

The tool suits teams managing large repositories who need to prevent secret introduction while gradually migrating existing secrets to secure storage. It provides three distinct workflows: scanning to create or update baselines of known secrets, blocking new secrets via pre-commit hooks, and auditing baselines to label and prioritize secrets for migration. The project includes inline allowlisting for false positives and operates through a plugin system, allowing teams to enable or disable specific secret detection patterns based on their needs.

The project maintains active development with regular updates to its baseline format and plugin compatibility. The codebase receives ongoing refinement of its detection heuristics and continues to expand its documentation and configuration options. The tool is available through standard package installation methods and integrates with common development workflows through pre-commit framework support.