simple-detect-secrets
simple-detect-secrets tries to find secrets (passwords, auth tokens) in a codebase.
In git repositories, simple-detect-secrets only scans checked-in files.
Otherwise it scans all files.
Running
Simply run
uvx simple-detect-secrets
in a directory to search for possible secrets.
Exclude files or directories with repeatable, quoted glob patterns:
uvx simple-detect-secrets --exclude '*.log' --exclude 'vendor/*' --exclude '.venv'
Developing
uv sync --locked
uv run simple-detect-secrets
uv run pytest tests
Build the source distribution and wheel with uv build. Install the optional
word-list support with uv sync --extra word_list.
Caveats
This is not meant to be a sure-fire solution to prevent secrets from entering the codebase. Only proper developer education can truly do that. This pre-commit hook merely implements several heuristics to try and prevent obvious cases of committing secrets.
Things that won't be prevented
- Multi-line secrets
- Default passwords that don't trigger the
KeywordDetector(e.g.login = "hunter2")
Notes
This is an old fork of Yelp's detect-secrets.
This is a command line tool:
- never calls the network
- doesn't obfuscate/hash the secrets that it finds
- doesn't have plugins
Metadata
Release files for simple-detect-secrets 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simple_detect_secrets-0.0.2.tar.gz | 41.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_detect_secrets-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 99.6 kB
Release files / simple_detect_secrets-0.0.2.tar.gz
| Download URL | simple_detect_secrets-0.0.2.tar.gz |
|---|---|
| Size | 41.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7f4e838770a22f8d671a8c3d3b677ed9b7fc462ed482ab03c2dc2583a6effbc
|
|
BLAKE2b-256 checksum How to use checksums |
2636ba0cf1e88fa1c25e889f47d7c8bc04cc0008a74b2be709ae797d5f382590
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / simple_detect_secrets-0.0.2-py3-none-any.whl
| Download URL | simple_detect_secrets-0.0.2-py3-none-any.whl |
|---|---|
| Size | 58.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10a6ca00b3adc6dfb8d6d6cd6c6374acd0f3961e23b7398773244bd764929056
|
|
BLAKE2b-256 checksum How to use checksums |
fb6a6cf635f06b701701937ef91e911c6a581e00958a390df1520ab7937df647
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|