Install
openclaw skills install nirwan-secret-scannerScans files, repos, and directories for leaked secrets — API keys, tokens, passwords, connection strings, private keys, and credentials. Detects 40+ secret patterns across all major cloud providers and services.
openclaw skills install nirwan-secret-scannerSecurity skill that scans code, config files, and repos for accidentally leaked secrets and credentials.
Use this skill when the user:
python secret_scanner.py /path/to/project
python secret_scanner.py /path/to/project --json
python secret_scanner.py /path/to/project --output report.md
"Scan this project for leaked secrets"
"Check if there are any API keys in the codebase"
"Run secret-scanner on the current directory"
"Find hardcoded passwords in my config files"
"Audit this repo before I push to GitHub"
| Provider | Secrets Detected |
|---|---|
| AWS | Access Key ID (AKIA...), Secret Access Key, Session Token |
| Azure | Storage Account Key, Connection String, SAS Token, Client Secret |
| GCP | API Key (AIza...), Service Account JSON, OAuth Client Secret |
| Service | Pattern |
|---|---|
| OpenAI | sk- prefixed API keys |
| Anthropic | sk-ant- prefixed keys |
| Hugging Face | hf_ prefixed tokens |
| Cohere | API keys in config |
| Platform | Secrets Detected |
|---|---|
| GitHub | ghp_, gho_, ghu_, ghs_, ghr_ tokens |
| GitLab | glpat- tokens |
| Slack | xoxb-, xoxp-, xoxs- tokens, webhook URLs |
| Stripe | sk_live_, sk_test_, rk_live_ keys |
| Twilio | Account SID, Auth Token |
| SendGrid | SG. prefixed API keys |
| Type | Pattern |
|---|---|
| MongoDB | mongodb:// or mongodb+srv:// with credentials |
| PostgreSQL | postgresql:// with embedded password |
| MySQL | mysql:// with embedded password |
| Redis | redis:// with password |
| SSH | -----BEGIN (RSA|EC|OPENSSH) PRIVATE KEY----- |
| Certificates | PEM, PFX, P12 with embedded keys |
| Pattern | Description |
|---|---|
| password= | Hardcoded passwords in config/env files |
| secret= | Hardcoded secrets |
| token= | Hardcoded tokens |
| Bearer | Bearer tokens in code |
| Basic Auth | Base64-encoded basic auth headers |
| JWT | eyJ prefixed JWT tokens |
| High Entropy | Long random strings that look like secrets |
| Severity | Description | Examples |
|---|---|---|
| 🔴 Critical | Active production credentials | AWS Secret Key, Private Keys, DB passwords |
| 🟠 High | Service tokens with broad access | GitHub PAT, Slack Bot Token, Stripe Live Key |
| 🟡 Medium | Keys that may be test/dev | Test API keys, example tokens |
| 🟢 Low | Potential false positives | Generic password= in comments, placeholder values |
Scans these file types by default:
.py, .js, .ts, .java, .go, .rb, .php, .cs, .rs.json, .yaml, .yml, .toml, .ini, .cfg, .conf.env, .env.local, .env.production.sh, .bash, .zsh, .ps1.md, .txtDockerfile, docker-compose.yml, MakefileAutomatically skips:
node_modules/, vendor/, venv/, .venv/.git/, .svn/__pycache__/, .pytest_cache/package-lock.json, yarn.lockWhen secrets are found, the skill recommends:
.env and credential files from being committedsecret_scanner.py#security #secrets #credentials #api-keys #tokens #passwords #scanner #audit #pre-commit #leak-detection #cloud #aws #azure #gcp #devops