/reports-sanitizer:sanitize-reportsfrom reports-sanitizer
Redacts secrets, API tokens, credentials, emails, home paths, the account name, the host name and terminal control characters from report files, folders or a stdin stream with a plain script, and scans folders for leaked secrets with the secrets-shield scanner. Use when a report, log or reports folder must be cleaned before it is committed, shared or published, or when a folder must be checked for secrets. Trigger with "sanitize reports", "redact secrets in reports", "scan for leaked secrets".
Ships in reports-sanitizer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This plugin ships two commands that cost no model tokens:
sanitize_reports.py rewrites text files in place, replacing secrets, tokens, credential values, emails, payment card numbers, the home prefix of paths, the account name, the host name and terminal control or invisible characters with markers. Matched values are never printed.shield_scan_cli.py runs the vendored secrets-shield folder scanner (vendor/secrets-shield-core/scan/scan.ts).Both use the same secrets-shield engine as ai-maestro-janitor, vendored from Emasoft/secrets-shield-core under vendor/secrets-shield-core/ and pinned by UPSTREAM.json. It is a backstop, not a gate: it matches shapes, not meaning.
sanitize_reports.py exits 4 and changes nothing, and shield_scan_cli.py exits 4..git skipped), or text on stdin. With no path the script sanitizes <git toplevel of the current folder>/reports.uv run "${CLAUDE_PLUGIN_ROOT}/sanitize_reports.py" --scan <path>. Exit 3 means at least one file would change.uv run "${CLAUDE_PLUGIN_ROOT}/sanitize_reports.py" <path>.... Writes are atomic, keep the file mode, and a rerun changes nothing.<command> | uv run "${CLAUDE_PLUGIN_ROOT}/sanitize_reports.py" --stdin > out.txt. The redacted text goes to stdout, the report to stderr. --stdin takes no path.--json (counts and kinds only, never a value). Not allowed with --stdin in write mode.--dry-run (report, write nothing), --extra TERM (repeatable, extra terms to hide), --user NAME and --host NAME (replace the detected account and host names), --group ssh-login (opt-in: hide the user of user@host on ssh/scp/rsync lines), --group uuid (opt-in: hide UUID-shaped ids such as session and message ids). SANITIZE_REPORTS_EXTRA takes comma-separated extra terms.uv run --no-project "${CLAUDE_PLUGIN_ROOT}/shield_scan_cli.py" [scan.ts options] [root]. With no root it scans the current folder; --out PATH must be outside any git work tree. Options are documented in the header of vendor/secrets-shield-core/scan/scan.ts.sanitize_reports.py: one line per changed file, path: n replacements (kinds), then a summary: line; with --json one JSON document {"mode", "files", "summary"}. Error lines go to stderr.shield_scan_cli.py: the scan.ts report and summary line, and the path of its findings file on stdout; --out PATH chooses where the file goes.sanitize_reports.py exit codes (from its docstring): 0 ok, 1 file error, 2 bad usage, 3 findings (--scan only), 4 shield core unavailable or failed. When several hold, the first of 2, 4, 1, 3, 0 wins. Exit 4: install bun when the message says bun is required; reinstall the plugin when it says the shield bridge is missing; a bridge that did not answer within its deadline is reported as such. With --json in write mode, a shield failure part-way lists the files already rewritten on stderr ({"aborted": true, "files": [...]}). Exit 2 also covers a --user, --host or --extra value under 3 characters or a reserved name (root, user, runner, localhost).
shield_scan_cli.py exit codes: 0 complete with no findings, 1 findings, 2 usage or fatal error (also when scan.ts or pyproject.toml cannot be read), 3 incomplete scan, 4 bun not on PATH; a child killed by a signal exits 128 plus the signal.
# Does the reports folder hold anything to redact?
uv run "${CLAUDE_PLUGIN_ROOT}/sanitize_reports.py" --scan reports/
# Redact a final report before committing it
uv run "${CLAUDE_PLUGIN_ROOT}/sanitize_reports.py" reports/cpv/20261126_120000+0100-audit.md
# Redact a command output on the fly
git log -5 | uv run "${CLAUDE_PLUGIN_ROOT}/sanitize_reports.py" --stdin
# Scan a project folder for leaked secrets
uv run --no-project "${CLAUDE_PLUGIN_ROOT}/shield_scan_cli.py" /path/to/project
${CLAUDE_PLUGIN_ROOT}/README.md: full list of what is redacted and what is not.${CLAUDE_PLUGIN_ROOT}/vendor/secrets-shield-core/KNOWN-MISSES.md: shapes the shield engine does not catch.What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
Other plugins' skills for the same job
reports-sanitizer@emasoft-plugins is listed by emasoft/emasoft-plugins — review the source before installing
npx claudepluginhub emasoft/emasoft-plugins --plugin reports-sanitizer