PAGES
← all tools
◆ Secrets Detection & Management

detect-secrets

v1.5.0 open-source

An enterprise friendly way of detecting and preventing secrets in code. - Yelp/detect-secrets

Summary

detect-secrets is an open-source command-line tool that scans a codebase for secrets accidentally committed to source control, using regex, entropy, and keyword heuristics rather than full history scans. It is free to use. Rather than treating every scan as pass/fail, it generates a baseline file that records secrets already present, then checks future diffs against that baseline so new secrets are caught while existing ones are tracked for later cleanup, an approach its README pitches at enterprise codebases rather than small side projects; this makes it a fit for application security and platform teams enforcing pre-commit checks across large, pre-existing repositories rather than greenfield ones. Maintained by Yelp since 2017 with 96 contributors, it has seen only one commit in the past year and its last release was over two years ago, suggesting development has slowed considerably.

An enterprise friendly way of detecting and preventing secrets in code. - Yelp/detect-secrets

How detect-secrets helps

Which of my files already contain secrets that predate any scanning I'm about to enforce?

scans the repository once and writes every match it finds into a baseline file, separating what already exists from what shows up afterward

Does a new commit introduce a secret that wasn't there before?

diffs the incoming changes against the stored baseline and flags only matches that are not already recorded, rather than re-flagging everything

Which of the flagged strings in my repo are real secrets versus false positives?

walks through each baseline entry interactively so someone can label it as real or false, updating the baseline with that verdict

Which kinds of credentials is my codebase even being checked for right now?

lists every detector plugin currently enabled, so gaps in coverage (a token type nobody turned on) are visible before they matter

Has my baseline gone stale as the repository changed?

re-scans and rewrites the baseline against the current file set, dropping entries for secrets that no longer exist and adding new matches to be triaged

Which flagged secrets still need to be rolled and migrated to safer storage?

produces a report that splits confirmed real secrets from confirmed false positives, giving a working list of what still needs remediation

all 13 features, with the evidence for each →

Languages

Not documented

Features

13 capabilities · 3 backed by code, an API document or a real run

Built from detect-secrets's releases, docs, README and our own runs. “Seen” marks the month we first spotted a release the vendor didn't date. Group names and tags are our labels.

Compare with peers →

  • detect-secrets covers 1 of the 2 secrets and credential hygiene capabilities we track.

What detect-secrets offers you

  • Command-line interface6
  • ML-based detection1
Secret scanning 4 features Secrets and credential hygiene since 2018
Secret scanning baseline shipped Scans a repository and creates a baseline of all detected secrets for future comparison. 12 releases · 10 other sources · first seen Jun 2018

Shared capability: Secret scanning

Also counts toward: Command-line interface

release 12 total

  • Supports OS-agnostic baseline files, allowing baselines generated on one OS to be used on another v1.5.0 · May 2024 · source · release history
  • Core engine and module APIs have changed significantly, requiring migration for users interacting with detect-secrets as a library February 24th, 2021 · Feb 2021 · source · release history
  • Verify Slack secrets more accurately August 27th, 2020 · Aug 2020 · source · release history
  • Add support for custom plugins July 9th, 2020 · Jul 2020 · source · release history
  • Adds a plugin for IBM Cloud Object Storage HMAC to detect secrets in COS HMAC keys. March 26th, 2020 · Mar 2020 · source · release history
  • Adds a Twilio plugin to detect secrets in Twilio credentials. March 26th, 2020 · Mar 2020 · source · release history

docs

  • Scans codebases for secrets using regex, entropy, and keyword heuristics, and maintains a baseline to prevent new secrets from being committed.

example 9 total

  • Exclude specific secrets matching a regex from scan results detect-secrets scan --exclude-secrets 'TEST-KEY-[0-9]+' ./src February 24th, 2021 · Feb 2021 · source
  • Ignore a line containing a false positive using the new XML inline comment directive. // detect-secrets: ignore this line May 13th, 2019 · May 2019 · source
  • Update the baseline to include detections from all available plugins, not just those previously active. detect-secrets scan --use-all-plugins . > .secrets.baseline February 11th, 2019 · Feb 2019 · source
  • Scan a repository while excluding specific file patterns or line numbers containing false positives. detect-secrets scan --exclude-files '.*\.min\.js' --exclude-lines '10-20' . > .secrets.baseline February 11th, 2019 · Feb 2019 · source
  • Update the baseline with new findings using the renamed argument. detect-secrets scan --update baseline.yaml August 1st, 2018 · Aug 2018 · source
  • Migrate an existing detect-secrets baseline file to the current schema format. detect-secrets migrate secrets.baseline June 27th, 2018 · Jun 2018 · source
Parallel scan execution shipped Enables faster secret scanning by utilizing multiple CPU cores for parallel processing. 6 releases · first seen Apr 2021

Shared capability: Secret scanning

Also counts toward: Command-line interface

release

  • Adds openai_token detector to scan for OpenAI tokens v1.5.0 · May 2024 · source · release history
  • Added a detector for IP addresses 3.10 · May 2024 · source · release history
  • Adds pypi_token and testpypi_token detectors to scan for PyPI and TestPyPI tokens v1.5.0 · May 2024 · source · release history
  • Added a detector for Telegram tokens 3.10 · May 2024 · source · release history
  • Adds --multiprocessing option to enable faster scans via parallel processing April 14th, 2021 · Apr 2021 · source · release history
  • Adds multiprocessing support for parallel scan execution v1.1.0 · Apr 2021 · source · release history
Gibberish detection model verified Uses a configurable trained model to identify gibberish strings and reduce false positives during secret scanning. 4 releases · 1 other source · first seen Sep 2019

Shared capability: Secret scanning

Also counts toward: Command-line interface, ML-based detection

release

  • Adds gibberish filter to detect random/alphanumeric strings as secrets April 14th, 2021 · Apr 2021 · source · release history
  • Adds new filters to ignore common lock files and swagger files by extension April 14th, 2021 · Apr 2021 · source · release history
  • Adds alphanumerical filter requiring at least one letter or number in detected secrets April 14th, 2021 · Apr 2021 · source · release history
  • Adds --word-list option to filter secrets based on contained words (requires pip install detect-secrets[word_list]) September 23rd, 2019 · Sep 2019 · source · release history

command line

  • --gibberish-model — Path to model trained with gibberish-detector. v1.1.0 · Apr 2021 · command-line history
Incremental secret scanning shipped Scans only added or modified lines in a working directory for secrets before committing. 2 other sources · first seen Nov 2018

Shared capability: Secret scanning

example

  • Scan only added or modified lines in a working directory for secrets before committing. detect-secrets audit --diff November 26th, 2018 · Nov 2018 · source
  • Scan all files including untracked detect-secrets scan test_data/ --all-files > .secrets.baseline
Other / not yet classified 9 features Features we have not matched to a capability yet. A suggested match is marked.
Expanded secret type detection shipped Detects specific types of secrets beyond AWS credentials, including Azure storage keys and Square OAuth tokens. 15 releases · first seen Feb 2021

release 15 total

Secret detection report verified Displays a report of detected secrets, with options to filter results to only real secrets or only false positives. 11 releases · 4 other sources · first seen Jun 2018

release 11 total

  • Improved the audit command output format to produce a structure that is easier to parse programmatically v1.4.0 · Oct 2022 · source · release history
  • Adds --report flag to audit command to extract secret values using the baseline April 14th, 2021 · Apr 2021 · source · release history
  • Adds Softlayer plugin to detect secrets stored in IBM Softlayer environments October 28th, 2019 · Oct 2019 · source · release history
  • Extends the base64 plugin to recognize URL-safe base64 encoded strings October 28th, 2019 · Oct 2019 · source · release history
  • Adds JwtTokenDetector plugin to detect JSON Web Tokens in scanned files September 23rd, 2019 · Sep 2019 · source · release history
  • Adds MailchimpDetector plugin for detecting Mailchimp secrets September 16th, 2019 · Sep 2019 · source · release history

command line

  • --only-false — Only includes false positives in the report v1.1.0 · Apr 2021 · command-line history
  • --report — Displays a report with the secrets detected v1.1.0 · Apr 2021 · command-line history
  • --only-real — Only includes real secrets in the report v1.1.0 · Apr 2021 · command-line history

example

  • Generate a report of detected secrets from a baseline for review detect-secrets audit --report . > secrets_report.json April 14th, 2021 · Apr 2021 · source
Interactive secret review shipped Lets users interactively review flagged secrets to classify them as real or false positives. 9 releases · 5 other sources · first seen Jun 2018

Also counts toward: Command-line interface

release 9 total

  • Adds --only-allowlisted flag to scan for inline ignores February 24th, 2021 · Feb 2021 · source · release history
  • Adds support for # pragma: allowlist nextline secret comment to ignore the following line in source code February 24th, 2021 · Feb 2021 · source · release history
  • Adds verification for Mailchimp API keys via new detection logic September 23rd, 2019 · Sep 2019 · source · release history
  • Adds verification for Stripe secret API keys via new detection logic September 23rd, 2019 · Sep 2019 · source · release history
  • Adds verification capability for Slack webhooks September 16th, 2019 · Sep 2019 · source · release history
  • Added webhook detection to SlackDetector plugin July 23rd, 2019 · Jul 2019 · source · release history

example

  • Check if a specific string is a valid secret interactively. detect-secrets > Is this a valid secret? > password123 > no > (b)ack September 12th, 2018 · Sep 2018 · source
  • Check strings in an adhoc manner via stdin. echo "my_secret_token" | detect-secrets scan --stdin September 12th, 2018 · Sep 2018 · source
  • Interactively audit a baseline file to mark false positives before committing. detect-secrets audit secrets.baseline June 27th, 2018 · Jun 2018 · source
  • Interactively review flagged secrets detect-secrets audit .secrets.baseline
  • Audit and label baseline secrets detect-secrets audit .secrets.baseline
Compact baseline generation shipped Generates baseline files optimized to minimize size and reduce git history bloat. 1 release · 1 other source · first seen Feb 2021

Also counts toward: Command-line interface

release

  • Adds --slim flag to generate baselines that minimize git diffs February 24th, 2021 · Feb 2021 · source · release history

example

  • Generate a compact baseline file to reduce git history bloat detect-secrets scan --slim > .secrets.baseline February 24th, 2021 · Feb 2021 · source
Selective scanning components shipped Allows users to selectively disable specific detectors or filters to customize scan behavior. 1 release · 1 other source · first seen Feb 2021

Also counts toward: Command-line interface

release

  • Adds --disable-filter and --disable-plugin flags to selectively disable scanning components February 24th, 2021 · Feb 2021 · source · release history

example

  • List all enabled detector plugins detect-secrets scan --list-all-plugins
Ignored file extensions shipped Configures the list of file extensions that the cyber tool will skip during secret detection. 1 release · first seen Feb 2022

release

Working directory override verified Allows the tool to run as if it were started from a specified path rather than the current working directory. 1 other source · first seen Apr 2021

command line

  • -C — Run as if detect-secrets was started in <path>, rather than in the current working directory. v1.1.0 · Apr 2021 · command-line history
Inline allowlisting shipped Allows users to ignore the next line in source code using inline comments without modifying baseline files. 1 other source · first seen Feb 2021

example

  • Use inline comments to allowlist the next line in source code without configuring a baseline # pragma: allowlist nextline secret const password = '…'; February 24th, 2021 · Feb 2021 · source
Ad-hoc secret verification shipped Check if a specific string is a valid secret interactively via stdin without scanning a repository. 1 other source · first seen Sep 2018

example

  • Check if a specific string is a valid secret interactively. detect-secrets > Is this a valid secret? > password123 > no > (b)ack September 12th, 2018 · Sep 2018 · source

Lines in monospace are the tool's own words: help text parsed from its source, or an endpoint from its API document. Under release, a line is our summary of a dated release. Under docs, it is quoted from the tool's own documentation or website. Each links back to the source it came from.

Score card

  1. Shipping velocity releases a month, last 12 months
  2. Documentation quality release-notes rubric, 0–100
  3. Breaking-change discipline how rarely a release breaks users, and notice given
  4. Maintenance risk quiet time against its own cadence, maintainers
  5. Innovation & surface new capabilities, API and MCP surface
  6. Community health
  7. Contributor trend distinct committers, this year against last
  8. Maintainer concentration bus factor now against a year ago
  9. Issue backlog trend issues closed per issue opened, 12 months
  10. Responsiveness median time to a maintainer’s first reply

Nine scores for detect-secrets, each built from the releases, notes and API history this site tracks — and, on Researcher and Business, where it stands among every measured tool in its category and how that has moved.

Score cards are part of every paid plan.

See plans →

Each score is 0–100 on a published rubric, derived from data this site already shows. A dimension we cannot measure says so — it is never scored 0 and never enters a rank.

How this is scored
  • Shipping velocity — releases a month over the last 12 months, on a log scale where 16 a month scores 100. Needs 3 releases in the window.
  • Documentation quality — the release-notes rubric published on the analytics page, unchanged.
  • Breaking-change discipline — the share of releases carrying a breaking change (none scores 100, half or more scores 0). Only projects that label breaking changes are measured: a clean record cannot be told from an unlabelled one.
  • Maintenance risk — quiet time measured against the tool's own release cadence (quiet longer than 90 days and three typical gaps scores 0), plus the number of active maintainers and whether contributors are growing, where known. Higher is lower risk.
  • Innovation & surface — new capabilities in the feature ledger this year, API and MCP operations added, and the share of commits that are features: the mean of whichever we hold.
  • Community health (open-source tools only) — each is a direction, not a size: contributors this year against last, the bus factor now against a year ago, and issues closed per issue opened, where steady scores 50, doubled 100 and halved 0; plus the median time to a maintainer's first reply (an hour scores about 100, a month or more 0). A commercial card has no repository and carries none of the four.
  • Documented delivery (commercial tools) — when a vendor's documented new capabilities have slowed against its own baseline, that counts against the overall standing as heavily as two low dimensions. Steady delivery, or too little history to judge, leaves the standing alone; it is never a sixth score.
  • Open-source tools are scored on repository signals; commercial tools on their published changelog. Ranks compare tools within one category and one profile and need at least five measured peers; the overall standing needs three ranked dimensions. Best-in-breed or consolidator is a shape, not a quality, and is never scored.

Release-note detail over time

See how much detail detect-secrets puts in its release notes, quarter by quarter, and compare it with tracked tools in the same category. This history uses up to ten retained, reviewed notes per tool; sparse or blank older quarters may reflect that limit.

Checking release-note history…

Explore the full chart →

Releases

Show

24 entries

  1. May 20242
  2. October 20222
  3. July 20222
  4. February 20222
  5. April 20212
  6. February 20211
  7. August 20201
  8. July 20201
  9. March 20201
  10. October 20191
  11. September 20192
  12. July 20191
  13. May 20191
  14. February 20191
  15. November 20181
  16. September 20181
  17. August 20181
  18. June 20181
    Show

    24 entries

    Project health

    Issue, contributor and maintainer activity in Yelp/detect-secrets, 2023-10 – 2026-09, as of 2026-09-25. Twelve-month figures first; the trend lines run the whole window.

    1. Contributors 1 −3 vs prior 12 months
    2. Maintainers 0 +0 joined · −0 left, last 12 months
    3. Bus factor 0 committers behind half the commits
    4. Community-filed 100% of issues opened, last 12 months
    5. Median time to close < 1 day first maintainer reply 32 days
    6. Open backlog 99 of 346 issues ever filed
    1. Issues opened / month 0 · 0 communitymaintainers
    2. Open backlog 99
    3. Contributors / month 0
    4. Commits / month 0
    5. Stars 4,635
    Issue themes, last 12 months
    • other 100%

    Counts from the project's public repository and git history; no individuals are identified. Maintainers are the committers covering 80% of the last year's commits. how we measure this

    Add the badge to your README

    Maintain this project? The badge links readers straight to this page, so they can follow every release here.

    Tracked by Cyber Toolchain Choose a badge style and copy the code →
    browse all tools → score card for your toolchain →