Yelp/detect-secrets

Pre-commit hook fails with "error: Unable to read baseline."

Closed this issue · 1 comments

Detect secrets...........................................................Failed
- hook id: detect-secrets
- exit code: 1

usage: detect-secrets-hook.EXE [-h] [-v] [--version] [-C <path>]
                               [-c NUM_CORES] [--json] [--baseline FILENAME]
                               [--list-all-plugins] [-p PLUGIN]
                               [--base64-limit [BASE64_LIMIT]]
                               [--hex-limit [HEX_LIMIT]]
                               [--disable-plugin DISABLE_PLUGIN]
                               [-n | --only-verified]
                               [--exclude-lines EXCLUDE_LINES]
                               [--exclude-files EXCLUDE_FILES]
                               [--exclude-secrets EXCLUDE_SECRETS] [-f FILTER]
                               [--disable-filter DISABLE_FILTER]
                               [filenames ...]
error: Unable to read baseline.
  • What is the expected behavior?

  • Commit succeeds since no new secrets are added.

  • What is the motivation / use case for changing the behavior?

  • The tool is unusable as it is now.

  • Please tell us about your environment:

    • detect-secrets Version: 1.4.0
    • Python Version: 3.11.7
    • OS Version: Microsoft Windows 10 Business version 10.0.19045 Build 19045.
    • File type (if applicable): secrets baseline file
      secrets.baseline.txt (renamed to allow upload to github).
  • Other information

File encoding was UTF-16 BOM. Converted to UTF-8 and fixed the issue.