Secret Scan CLI
Scan a local directory for likely leaked credentials (AWS keys, GitHub
tokens, Slack tokens, private keys, generic api_key= assignments) --
offline, no dependencies. Python 3.8+, stdlib only (re, os,
argparse). No network at runtime.
Install
pip install plainkitbin-secret-scan-cli
Usage
secret-scan-cli .
secret-scan-cli path/to/repo
Exits with code 1 if any finding is present, 0 otherwise (suitable
for a pre-commit hook or CI check). Matches are redacted in the output
(only the first/last 4 characters are shown).
What it detects
Fixed regex patterns for: AWS access keys, GitHub personal access
tokens (ghp_...), Slack tokens (xox...), PEM-style private key
blocks, and a generic api_key = "..." pattern.
Limitations
Pattern-based only -- no entropy analysis, no support for credential formats outside the five patterns above, and no historical git-log scanning (working tree only). This will miss credentials that do not match a known shape. It is a lightweight local check, not a substitute for a dedicated credential-scanning service.
Free and open source (MIT license, see LICENSE). No telemetry, no network calls, no nagware.
Part of the PlainKitBin toolset.
Provided as-is with no individual support.
Built with AI assistance and automatically tested before release; released under human oversight.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plainkitbin_secret_scan_cli-1.0.0.tar.gz.
File metadata
- Download URL: plainkitbin_secret_scan_cli-1.0.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24d086de6dfa21d4eaf31015bdc688717dedb40068a0875575bf46a5c0b56110
|
|
| MD5 |
3aed5f7863eb0b17b7aa55727ffc0206
|
|
| BLAKE2b-256 |
37b663b6da19a5100a6ebf5d1c2cc766b2e7aaec82681e1bb35e03ef1b7190d7
|
File details
Details for the file plainkitbin_secret_scan_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: plainkitbin_secret_scan_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4511b997a22eaa3f4a548031a20ab1344a2b2643f216c2d4c1397603cdf3cb6d
|
|
| MD5 |
ee88ece6c6c86661eefe0c2866e647bb
|
|
| BLAKE2b-256 |
f5ba696ce17988c528d81e09dd44483853b6cef08700201326eb3a7b8befbcee
|