Metadata-Version: 2.4
Name: episodely-leakcheck
Version: 0.1.0
Summary: Scan a folder for leaked API keys and secrets before you push.
Author: episodely
License: MIT
Project-URL: Homepage, https://github.com/episodely/leakcheck
Project-URL: Issues, https://github.com/episodely/leakcheck/issues
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# leakcheck

Scan a folder for leaked API keys and secrets before you `git push`. Pure Python, no dependencies, offline. Secrets are masked in the output so the report itself does not leak them.

```
$ python -m leakcheck .
./config.py:4: aws-access-key: AKIA************MPLE
1 potential secret(s) found.
```

Exit code is 1 when anything is found, so it works as a pre-commit or CI step:

```
python -m leakcheck . || exit 1
```

Detects AWS keys, GitHub tokens, OpenAI-style `sk-` keys, Slack tokens, Google API keys, Stripe live keys, PEM private keys, and generic `password = "..."` assignments. Skips `.git`, `node_modules`, virtualenvs, binaries and files over 1 MB. Patterns are in one dict at the top of `leakcheck.py`.

It is a regex scanner: it will miss some secrets and flag some false positives. If a real secret was ever committed, rotate it.

## Install

```
pip install episodely-leakcheck
```

Or copy `leakcheck.py` into your project, it has no dependencies.

## Test

```
python -m pytest
```

MIT licensed.
