← ClaudeAtlas

secret-preflightlisted

Scan a repository for committed secrets, API keys, tokens, and private keys before deploying or pushing. Use before any first push to a public repo, before any deploy, when the user mentions 'did I commit a secret', 'API key in code', security review, or open-sourcing a project — and proactively if you notice a hardcoded credential while doing other work. Runs fully offline — no API keys, no network, no credentials.
Starr-del/deploy-preflight · ★ 0 · DevOps & Infrastructure · score 70
Install: claude install-skill Starr-del/deploy-preflight
# secret-preflight Part of **deploy-preflight** — offline deploy-safety skills. Every script is stdlib-only Python 3.8+; nothing leaves the machine. ```bash python3 scripts/scan_secrets.py <project_root> [--json] ``` Two detection layers: 1. High-precision patterns for real key formats: AWS, GitHub, Stripe (live vs test severity), OpenAI, Anthropic, Slack, Google, Supabase, private-key blocks, hardcoded JWTs, Postgres URLs with embedded passwords. JWTs are decoded offline: a payload with `"role":"service_role"` is escalated to a dedicated Supabase SERVICE_ROLE finding — that key bypasses Row Level Security entirely, so anywhere near client code it means the whole database is public. This single mistake is behind the largest documented vibe-coding breaches. 2. Entropy analysis on assignments to secret-named variables (SECRET/TOKEN/API_KEY/...), with placeholder filtering to avoid false positives on 'your-api-key-here'. Also verifies .gitignore actually covers .env files. Local .env contents are intentionally NOT flagged — that's where secrets belong; committed code is what's scanned. Critical follow-ups when something is found: - If the key was EVER committed, removing the line is not enough — it lives in git history. The key must be ROTATED. Say this explicitly. - A finding can be suppressed for a known-safe line by adding the comment `secret-preflight: allow`. Exit codes: 0 clean, 1 findings. All paths below are relative to this skill's directory (secret-preflight/).