Skip to main content

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

plainkitbin_secret_scan_cli-1.0.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plainkitbin_secret_scan_cli-1.0.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file plainkitbin_secret_scan_cli-1.0.0.tar.gz.

File metadata

File hashes

Hashes for plainkitbin_secret_scan_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 24d086de6dfa21d4eaf31015bdc688717dedb40068a0875575bf46a5c0b56110
MD5 3aed5f7863eb0b17b7aa55727ffc0206
BLAKE2b-256 37b663b6da19a5100a6ebf5d1c2cc766b2e7aaec82681e1bb35e03ef1b7190d7

See more details on using hashes here.

File details

Details for the file plainkitbin_secret_scan_cli-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for plainkitbin_secret_scan_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4511b997a22eaa3f4a548031a20ab1344a2b2643f216c2d4c1397603cdf3cb6d
MD5 ee88ece6c6c86661eefe0c2866e647bb
BLAKE2b-256 f5ba696ce17988c528d81e09dd44483853b6cef08700201326eb3a7b8befbcee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page