Metadata-Version: 2.4
Name: secret-scan-lite
Version: 1.0.0
Summary: Fast CLI scanner for secrets and credentials in git staged files and directories
Author-email: Your Name <you@example.com>
License: MIT
Project-URL: Homepage, https://github.com/yourname/secret-scan-lite
Project-URL: Issues, https://github.com/yourname/secret-scan-lite/issues
Keywords: security,secrets,git,pre-commit,scanner
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: click>=8.0
Requires-Dist: colorama>=0.4.6

# secret-scan-lite

[![PyPI](https://img.shields.io/pypi/v/secret-scan-lite)](https://pypi.org/project/secret-scan-lite/)
[![Python](https://img.shields.io/pypi/pyversions/secret-scan-lite)](https://pypi.org/project/secret-scan-lite/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

> Fast CLI scanner that detects secrets and credentials in git staged files **before they hit your history**.

## Install

```bash
pip install secret-scan-lite
```

## Usage

```bash
# Scan staged files only (git pre-commit default)
secret-scan

# Scan a specific directory
secret-scan --path ./src

# Scan entire working tree
secret-scan --all
```

### Exit codes

| Code | Meaning |
|------|---------|
| `0` | Clean — no secrets found |
| `1` | Secrets detected — git will abort the commit |
| `2` | Error (not a git repo, git not installed, etc.) |

## Detected patterns

| Pattern | Severity |
|---------|----------|
| AWS Access Key ID (`AKIA…`) | HIGH |
| AWS Secret Access Key | HIGH |
| Generic password / secret / token assignment | HIGH |
| RSA / EC / OpenSSH Private Key | HIGH |
| Telegram Bot Token | HIGH |
| GitHub PAT (classic & fine-grained) | HIGH |
| Slack Bot / App Token | HIGH |
| Stripe Secret Key | HIGH |
| Google API Key | HIGH |
| Basic Auth in URL | MEDIUM |
| Generic Bearer Token | MEDIUM |

## Use as a pre-commit hook

Add to your `.pre-commit-config.yaml`:

```yaml
repos:
  - repo: local
    hooks:
      - id: secret-scan
        name: Scan for secrets
        entry: secret-scan
        language: system
        stages: [commit]
        pass_filenames: false
```

Install hooks:

```bash
pip install pre-commit
pre-commit install
```

## License

MIT
