secret-scanner

Solid

Static secret/token scanning for codebases and git repos: detects leaked credentials (AWS, GitHub, OpenAI, Anthropic, Stripe, Google, Slack, private keys, JWTs) using gitleaks v8.30.1 pattern table + Shannon entropy gating + allowlist noise filters. Stdlib-only Python script with JSON/Markdown/text reports, redaction, CI exit-code gate.

AI & Automation 5 stars 0 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
26
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Secret Scanner — leaked credential detection Load this skill when you need to **scan a codebase, directory, or git repo for leaked secrets/tokens/keys** (before publishing a repo, before a release, or during security review). The scanner is **static and offline by design**: patterns come from the [gitleaks v8.30.3 default config](https://github.com/gitleaks/gitleaks), the canonical open-source secret-detection rule set, and detection uses the same Shannon-entropy gating semantics as gitleaks. No network calls are made — a format match is reported as **potential**, not verified. --- ## The scanner script `scripts/secret_scanner.py` — pure Python 3 stdlib (no dependencies). | Source | Command | |---|---| | File | `python3 secret_scanner.py --path path/to/file` | | Directory (recursive) | `python3 secret_scanner.py --path path/to/dir` | | Git repo (tracked files) | `secret_scanner.py --git /path/to/repo` | | stdin (blob) | `cat file | secret_scanner.py` | ### Detected pattern families (19 rules) Critical: AWS Access Key ID (`AKIA`/`ASIA`/`ABIA`/`A3T…`) & secret key, GitHub PAT classic/fine-grained/refresh tokens, OpenAI (`sk-*T3BlbkFJ*`), Anthropic (`sk-ant-api03-…AA`), Stripe (`sk_live_`/`rk_live_`), Google API key (`AIza…`), private keys (PEM/OpenSSH/PGP blocks). High: Slack app/bot/user tokens and webhooks, Perplexity (`pplx-…`). Medium: JWT, generic keyword-anchored API keys. ### False-positive suppression (allowlists) - **Placeholders**: `$VAR`, `${VAR}`, `{{ }}...

Details

Author
bestdeejay-design
Repository
bestdeejay-design/agent-skills
Created
1 weeks ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

secret-scan

Scan the codebase and git history for leaked secrets using gitleaks. Detects API keys, tokens, passwords, and platform-specific patterns (Stripe sk_live_/sk_test_, AWS AKIA, RabbitMQ amqp://).

2 Updated 1 weeks ago
0merUfuk
AI & Automation Listed

secrets-scan

Scan for secrets (API keys, tokens, private keys, credentials, real .env files) before committing or pushing — enforces "never commit secrets". Prefers gitleaks if installed; otherwise uses high-signal patterns. Reports findings by file:line with the value redacted. Use before any commit/push, when adding config or fixtures, or whenever asked to check for leaked secrets. Read-only.

2 Updated today
chipi
AI & Automation Listed

secrets-sweeper-lite

Quick offline scan of a directory for the 10 most dangerous hardcoded credential types before publishing or sharing — private key blocks, AWS access keys, GitHub tokens, OpenAI / Anthropic / Google API keys, Slack tokens, Stripe live keys, JWTs, and generic key/secret/token assignments (entropy-checked). Prints masked findings straight to the terminal with CI-friendly exit codes; Python stdlib only, zero network calls, writes nothing to disk. Use when the user says "scan for secrets", "check for leaked keys", "did I hardcode a key somewhere", or before open-sourcing or handing off a repo. NOT for rotating or revoking credentials, scanning git history (working tree only), PII / IP-address / tunnel-domain / personal-path detection, custom denylists (names, internal terms), or exportable Markdown/JSON reports — those are in the full Secrets Hygiene Sweeper.

0 Updated 2 weeks ago
guildshelf