gitcollect is a small, dependency-free Git repository hygiene scanner. It
inspects files for hardcoded credentials, private key material, and other
common secret-leak patterns so they can be caught before they land in history.
It is deliberately tiny so it runs cleanly inside locked-down CI runners.
python -m pip install -e ".[dev]"gitcollect path/to/file.py another/file.envThe command exits non-zero when any finding is present, which makes it usable as a pre-merge gate.
| Rule id | Detects | Severity |
|---|---|---|
aws-access-key |
AWS access key ids | high |
private-key-block |
PEM private key blocks | high |
generic-secret-assignment |
Hardcoded secret/password/token assignments |
medium |
jwt-token |
JSON Web Tokens | low |
pytest --cov=gitcollect
ruff check .See CONTRIBUTING.md. Security reports go through SECURITY.md.
MIT.