* **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](https://github.com/Yelp/detect-secrets/files/14554834/secrets.baseline.txt) (renamed to allow upload to github).
* **Other information**
<!-- (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. Stack Overflow, gitter etc.). If you have or can produce a baseline file, please provide it as part of a separate comment. -->
I'm submitting a ...
What is the current behavior?
Getting "error: Unable to read baseline." when registering git pre-commit hook
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Run
detect-secrets scan > .secrets.baseline
Install pre-commit and register pre-commit hook as described on https://microsoft.github.io/code-with-engineering-playbook/continuous-integration/dev-sec-ops/secret-management/recipes/detect-secrets/
git add
something and commitCommit fail with
hook id: detect-secrets
exit code: 1
usage: detect-secrets-hook.EXE [-h] [-v] [--version] [-C]
[-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.