ワンクリックで
audit-env
Scan for secret leakage in env files, client code, git history, and build artifacts.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Scan for secret leakage in env files, client code, git history, and build artifacts.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Scan for PII exposure in API responses, committed files, grimoires, and data flow paths.
API endpoint security surface scan — auth gates, data exposure, rate limiting, input validation.
Audit authentication flow completeness — login, refresh, logout, session, RBAC, middleware.
Map impact surface of a change or regression by tracing data flow through every consumer.
Generate defensive measure specifications from a PMR — test specs, types, error boundaries, checklists.
Create a structured Postmortem Record from an incident, mining git history and issues for timeline and blast radius.
| name | audit-env |
| description | Scan for secret leakage in env files, client code, git history, and build artifacts. |
| user-invocable | true |
| allowed-tools | Read, Glob, Grep, Bash |
| triggers | ["audit env","scan for secrets","check env variables"] |
| capabilities | {"model_tier":"sonnet","danger_level":"safe","effort_hint":"small"} |
Find leaked secrets before they become incidents.
Check if .env files are tracked in git:
git ls-tree -r HEAD --name-only | grep -E '\.env'
git log --all --oneline -- '.env*' '**/.env*'
If any .env files were ever committed, they're in git history forever. Flag for secret rotation.
Check .gitignore for:
.env — root env.env.* — variant env files*.pem — private keys*.key — key files.run/ — runtime stateVerify patterns actually match existing files:
git status --ignored --short | grep '.env'
Search for NEXT_PUBLIC_* or VITE_* env vars in the codebase:
NEXT_PUBLIC_* references → these are bundled into client JSprocess.env.SECRET in client components (Next.js will embed these at build time if referenced)Patterns that SHOULD be NEXT_PUBLIC:
Patterns that should NEVER be NEXT_PUBLIC:
Search for patterns:
sk_[a-zA-Z0-9]{20,}
pk_[a-zA-Z0-9]{20,}
ghp_[a-zA-Z0-9]{36}
AKIA[0-9A-Z]{16}
-----BEGIN.*PRIVATE KEY-----
password\s*[:=]\s*["'][^"']+["']
secret\s*[:=]\s*["'][^"']+["']
Exclude: test fixtures, example configs, documentation
Check if .next/, dist/, build/ directories:
## Environment & Secrets Audit
### Committed Secrets
| File | Status | Action Needed |
|------|--------|---------------|
### Client-Side Exposure
| Variable | Value Type | Safe? |
|----------|-----------|-------|
### Hardcoded Secrets
| File:Line | Pattern | Severity |
|-----------|---------|----------|
### Summary
- N env files checked
- N committed to git history
- N client-exposed variables
- N hardcoded secrets found