Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
description: Scan for security signals — working-tree scanning already runs during init/update; use --history to walk full git history for leaked secrets. allowed-tools: Bash(repowise security scan:*), Read
Repowise Security
Scan for security signals with the same local pattern registry used during
repowise init / repowise update. Working-tree scanning already happens on
those commands. This slash command is for walking full git history to find
leaked secrets (and optionally risky patterns) that were later removed.
No LLM — pure local scan. Findings persist to security_findings and show up
in the local server security API / UI. Re-runs are idempotent.
Steps
- If
.repowise/doesn't exist: "This repo isn't indexed yet. Run/repowise:initfirst." Stop. - Decide the mode from
$ARGUMENTS(see below), run the command, and present a short summary (files scanned, findings stored, by severity / kind). Do not print raw secret values if any appear in output — summarize kinds and paths.
Modes
Default / no useful args — remind the user that working-tree scanning already ran during init/update, then offer history mode:
repowise security scan
(Without --history this prints a hint and exits — it does not re-run the
working-tree scan.)
Handle $ARGUMENTS:
- "history" / "full" / "scan history" →
repowise security scan --history - "json" with history →
repowise security scan --history --format json - "all" / "all-patterns" with history →
repowise security scan --history --all-patterns - A path →
repowise security scan --history --path <dir> - "since " / "to " → pass
--since/--toaccordingly
repowise security scan --history
repowise security scan --history --since v1.0.0 --to HEAD
repowise security scan --history --all-patterns --format json
Notes
- Default history mode reports leaked-secret patterns only
(
hardcoded_password/hardcoded_secret) to avoid noise. Pass--all-patternsfor code-smell patterns (eval,os.system, weak hashes, …). - Never invent findings. If the scan stores zero findings, say so plainly.
- For live-change review priority (not secret scanning), use
/repowise:risk.