cfsniff
A good dog that sniffs out leaked secrets in files, directories, and text — powered by the ClassiFinder API.
Install
pipx install cfsniff
Or with pip:
pip install cfsniff
Quick Start
# 1. Install
pipx install cfsniff
# 2. Set your API key (get one at https://classifinder.ai)
export CLASSIFINDER_API_KEY=cf_live_...
# 3. Sniff something
cfsniff audit
Usage
Scan a file
cfsniff secrets.txt
Scan a directory
cfsniff ./src
Pipe text in
echo "token=ghp_abc123..." | cfsniff
Scan your clipboard
cfsniff --clipboard
Audit current directory
cfsniff audit
Audit with extra paths
cfsniff audit --include logs
Audit and open an HTML report
cfsniff audit --report report.html --open
Output Formats
cfsniff audit # rich (default, color terminal output)
cfsniff audit --format plain # plain text (CI-friendly)
cfsniff audit --format json # machine-readable JSON
HTML Reports
The --report flag writes a self-contained HTML file with a full findings summary — useful for sharing with teammates or attaching to tickets.
cfsniff audit --report report.html --open
API Key
Get a free API key at https://classifinder.ai.
Set it via environment variable:
export CLASSIFINDER_API_KEY=cf_live_...
Self-Hosted Server
Want your shell history and configs to never leave your machine or network? Run the open-source scanner yourself (classifinder.ai/self-host) and point cfsniff at it with CLASSIFINDER_BASE_URL. Use one of the keys from the server's CLASSIFINDER_API_KEYS:
docker run -d -p 8000:8000 -e CLASSIFINDER_API_KEYS=change-me ghcr.io/classifinder/classifinder:latest
export CLASSIFINDER_BASE_URL=http://localhost:8000
export CLASSIFINDER_API_KEY=change-me
cfsniff audit
Leave CLASSIFINDER_BASE_URL unset to use the hosted API. --timing output shows which server was used.
Verifying This Build
Every release is published via PyPI Trusted Publishing with PEP 740 build attestations. No long-lived API tokens. The wheel you pip install is byte-identical to what GitHub Actions built from a tagged commit.
To verify a release: visit the project page on PyPI, click Download files, and check the Provenance section under each artifact. You'll see the sigstore attestation, the GitHub workflow run, and the exact commit SHA — all logged to the public Sigstore transparency log for independent verification.
This answers "is the wheel what's in the source?" — the cryptographic chain proves this wheel was built from ClassiFinder/cfsniff at the tagged commit, by a GitHub-hosted runner, and cannot be tampered with after the fact.
License
MIT
Metadata
Release files for cfsniff 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cfsniff-0.1.6.tar.gz | 35.7 kB | With provenance | Details for cfsniff-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cfsniff-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for cfsniff-0.1.6-py3-none-any.whl |
Total release size: 59.7 kB
Release files / cfsniff-0.1.6.tar.gz
| Download URL | cfsniff-0.1.6.tar.gz |
|---|---|
| Size | 35.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c211e689b78a40eaa6dd218b8f95d0ffc96d830ceb0c87cf09191e485a7a71ae
|
|
BLAKE2b-256 checksum How to use checksums |
117643a5c02b8794ebbbe21c6d33463cf61c0bed355e1ebd4a44d9ef766bee94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / cfsniff-0.1.6-py3-none-any.whl
| Download URL | cfsniff-0.1.6-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b48665344b264012b1b698eb98dadf02e469e0e18c93ff6a2c8d86f80d3bd6fb
|
|
BLAKE2b-256 checksum How to use checksums |
47b046f0fd28c32160bee8052c82c6eb072f7ee2b5c1fa2d5ffdc840ee3ff70b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logSecurity for cfsniff 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for cfsniff-0.1.6.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.