pastewatch

A deterministic scanner for finding and obfuscating sensitive text such as email addresses, API keys, credentials, and high-entropy strings. It uses regular expressions and does not use machine learning or network calls.

In plain words
What is it for?
Use it to scan text, configure detected secret types, maintain allowlists and ignore files, and create a baseline of findings that are already known.
Why use it?
It helps prevent secrets and other private values from being pasted or shared accidentally, while allowing project-specific exceptions and ignored paths.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ppiankov/pastewatch/docs
Any agent
npx skills add ppiankov/pastewatch --skill docs
Clone the repo
git clone --depth 1 https://github.com/ppiankov/pastewatch

Made for: Claude Code, Codex.

Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,225 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.05225
Opus 5 $0.00008 $0.02612
Sonnet 5 $0.00003 $0.01045
Haiku 4.5 $0.00002 $0.00522

Measured 2d ago against content hash 63c0c9f28ef4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pastewatch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (examples/claude-code/pastewatch-guard.sh, examples/cline/pastewatch-hook.sh, examples/cursor/pastewatch-guard.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/SKILL.md · 554 lines

How it starts

The opening of the file, as written. The whole thing — 554 lines — stays where its author put it; the contents beside it link to each section on GitHub.

pastewatch-cli

Sensitive data scanner. Deterministic regex-based detection and obfuscation for text content. No ML, no network calls.

For AI agent setup with secret redaction, see agent-integration.md.

Install

brew install ppiankov/tap/pastewatch

Configuration

Config files

File Location Purpose Created By
.pastewatch.json Project root ($CWD) Project-level config pastewatch-cli init
~/.config/pastewatch/config.json Home User-level defaults Manual / GUI app
.pastewatch-allow Project root Value allowlist (one per line, # comments) pastewatch-cli init
.pastewatchignore Project root Path exclusion patterns (glob, like .gitignore) Manual
.pastewatch-baseline.json Project root Known findings baseline (SHA256 fingerprints) pastewatch-cli baseline create

Resolution cascade

CWD .pastewatch.json > ~/.config/pastewatch/config.json > built-in defaults.

.pastewatch.json schema

{
  "enabled": true,
  "enabledTypes": ["Email", "AWS Key", "API Key", "Credential", "High Entropy"],
  "showNotifications": true,
  "soundEnabled": false,
  "allowedValues": ["[email protected]", "192.168.1.1"],
  "allowedPatterns": ["sk_test_.*", "EXAMPLE_.*"],
  "customRules": [
    {"name": "Internal ID", "pattern": "MYCO-[0-9]{6}", "severity": "medium"}
  ],
  "safeHosts": [".internal.company.com", "safe.dev.local"],
  "sensitiveHosts": [".local", "secrets.vault.internal.net"],
  "sensitiveIPPrefixes": ["172.16.", "10."],
  "mcpMinSeverity": "high",
  "placeholderPrefix": "REDACTED_PLACEHOLDER_"
}

sensitiveHosts supports 2-segment hostnames (e.g., .local catches nas.local) as well as 3+ segment FQDNs.

Field reference

Field Type Default Description
enabled bool true Enable/disable scanning globally
enabledTypes string[] All except High Entropy Which detection types to activate (see Detection Types)
showNotifications bool true System notifications on GUI obfuscation
soundEnabled bool false Sound on GUI obfuscation
allowedValues string[] [] Exact values to suppress (merged with .pastewatch-allow file)
allowedPatterns string[] [] Regex patterns for value suppression (wrapped in ^(...)$)
customRules object[] [] Additional regex detection patterns with name, pattern, optional severity
safeHosts string[] [] Hostnames excluded from detection. Leading dot = suffix match (.co.com matches x.co.com)
sensitiveHosts string[] [] Hostnames always detected — overrides built-in and user safe hosts. Also catches 2-segment hosts (e.g., .localnas.local)
sensitiveIPPrefixes string[] [] IP prefixes always detected — overrides built-in IP exclude list (e.g., 172.16., 10.)
mcpMinSeverity string "high" Default minimum severity for MCP pastewatch_read_file redaction (critical, high, medium, low)
placeholderPrefix string? null Custom prefix for MCP placeholders. When set, produces {prefix}001 instead of __PW_TYPE_N__

Read the full file on GitHub · 554 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 554 lines · 16 tokens per session scan A 63c0c9f28ef4

Subscribe to this mod's changes

pastewatch is a skill published in the GitHub repository ppiankov/pastewatch (5 stars, last pushed 3d ago), licensed MIT. It adds 16 tokens to every session and 5,225 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.