← ClaudeAtlas

scan-secretslisted

Scan a repository or directory for plaintext secrets — cloud keys, API tokens, passwords, private keys — and report them with every value masked. Uses a built-in Node.js scanner and, when installed, gitleaks for the working tree and the full git history. Invoked as /scan-secrets, optionally with a path and flags, for example "/scan-secrets ~/Projects/api --no-history". Read-only; it never changes, commits, or uploads anything. Use when the user asks to scan or audit a repo for secrets, leaked credentials, API keys or tokens, or to check before publishing or open-sourcing a repository.
y-a-v-a/skills · ★ 0 · Data & Documents · score 67
Install: claude install-skill y-a-v-a/skills
# scan-secrets — find plaintext secrets Answer one question: does this repository contain credentials in plain text, now or in its git history? Report where, never what. ## Invocation Arguments provided: $ARGUMENTS - `/scan-secrets` — scan the current working directory. - `/scan-secrets <path>` — scan that directory. - Flags are passed through to the script: | Flag | Effect | | --- | --- | | `--all` | Turn off the false-positive filters of the heuristic rule | | `--context=N` | Show N masked lines around each built-in finding | | `--no-gitleaks` | Skip gitleaks even when it is installed | | `--no-history` | Skip the gitleaks scan of the git history | | `--json` | Machine-readable report | ## Rule zero: never reveal a secret The script masks every value (`AKIA…(20 chars)`). Keep it that way. - Never `cat`, `grep`, `sed`, or otherwise print a matched line unmasked. To see context, rerun the script with `--context=N`; its context lines are masked too. - Never put a value, or a partial value beyond the masked prefix the script shows, in a reply, file, ticket, commit, or message. - gitleaks always runs with `--redact` through the script. Do not run it yourself without `--redact`. - Do not test whether a credential works by calling the service with it. ## Steps 1. **Resolve the target.** The path from the arguments, or the current working directory. Confirm it exists. 2. **Check for gitleaks.** Run `command -v gitleaks && gitleaks version`. - Present: the s