CheckOps
detect-secrets
detect-secrets is Yelp's Apache-2.0, enterprise-friendly module for preventing new secrets entering a codebase, detecting committed secrets and tracking them with a baseline file.
Latest public signals
Last updated: 11 November 2026 (page expanded from the official README or site).
Introduction
detect-secrets, from Yelp, is designed with enterprises in mind: it provides a backwards-compatible, systematic way of preventing new secrets from entering the codebase, detecting if secrets have already been committed, and auditing them. A baseline file records known findings so only new secrets block commits.
The source code is at Yelp/detect-secrets on GitHub under the Apache-2.0 licence, with about 4,700 stars; the most recent commit was on 2 April 2026.
detect-secrets is a Python module for detecting secrets in a codebase, designed with enterprises in mind. Rather than only finding secrets, its README describes a backwards-compatible, systematic approach: preventing new secrets from entering the codebase, detecting when that prevention is explicitly bypassed, and providing a checklist of existing secrets to rotate. It does this with a baseline file of known findings, so teams can adopt it on large existing repositories without fixing everything at once.
Where it fits: on CheckOps, detect-secrets is listed alongside alternatives such as Gitleaks, TruffleHog, Talisman and Kingfisher. When comparing them, check licence and hosting model, how results reach developers (pull requests, CI logs or dashboards), how much tuning is needed to keep noise low, and whether the project or vendor is actively maintained.
Features
- Baseline file: Track and audit existing findings.
- Pre-commit hook: Block new secrets.
- Plugins: Entropy and keyword detectors plus provider patterns.
- Audit workflow: Mark findings as true or false positives.
- Filters: Reduce false positives.
Pros
- Free to use: Open source under Apache-2.0.
- Maintained: Commits as recent as 2 April 2026.
- Community: About 4,700 GitHub stars.
Cons
- Less frequent updates: Last commit April 2026.
- No live verification: Does not validate secrets.
Usage and Links (Example)
pip install detect-secrets
detect-secrets scan > .secrets.baseline
detect-secrets audit .secrets.baseline
Resources:
Getting started tips: run detect-secrets once against the full Git history to find secrets that are already committed, rotate anything real (deleting a commit does not revoke a credential), then add it as a pre-commit hook and a CI check so new leaks are blocked. Keep an allowlist or baseline for test fixtures, and review it regularly so it does not hide real secrets.
Pricing
detect-secrets is free and open source under the Apache-2.0 licence.
Recommended for?
- Large codebases that need a baseline approach.
- Python-friendly teams using pre-commit.
- Not a fit if you need verification of live secrets.
Conclusion
detect-secrets is a pragmatic, baseline-driven way to stop new secrets.
As with any tool in this category, the value of detect-secrets comes from running it consistently and acting on what it finds, so wire it into an existing workflow rather than treating it as an occasional audit.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with detect-secrets side by side.
GGitleaksGitleaks is an MIT-licensed tool for detecting secrets such as passwords, API keys and tokens in Git repositories, files and stdin; it is now feature complete with security-patch-only releases.Compare with detect-secrets
TTruffleHogTruffleHog is Truffle Security's AGPL-3.0 secrets scanner that discovers, classifies (800+ types), verifies and analyses leaked credentials in Git, chats, wikis, logs, object stores and filesystems.Compare with detect-secrets
TTalismanTalisman is ThoughtWorks' MIT-licensed pre-commit and pre-push hook that inspects outgoing changesets for suspicious content such as tokens, passwords and private keys.Compare with detect-secrets
KKingfisherKingfisher is MongoDB's Apache-2.0 secret scanner and credential response tool in Rust: it detects leaked secrets with hundreds of rules, validates live credentials and maps blast radius.Compare with detect-secrets
GGitGuardianGitGuardian is a credential-layer security platform for secrets detection and remediation across code, CI and collaboration tools, available as SaaS or self-hosted, with a free plan.Compare with detect-secrets
BBanditBandit is the PyCQA's Apache-2.0 tool for finding common security issues in Python code by building an AST for each file and running security plugins against it.Compare with detect-secrets