ScrubGuard

v1.0.0
io.github.scrubguard-dev/scrubguard Checked 4 days ago Published 1 month ago

Local-first PII and secret scrubber with checksum checks and reversible LLM tokens.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

scrub_text

Scrub or reversibly tokenize PII (emails, SSNs, Luhn-verified credit cards, IBANs, phones, IPv4) and leaked API keys/secrets from text.

ParameterTypeDescription
text *stringRaw text or prompt to sanitize
modestringtokenize ([EMAIL_1] + reversible vault), redact, or mask
typesarrayOptional whitelist of detector types

rehydrate_text

Restore tokenized placeholders (e.g., [EMAIL_1], [CREDIT_CARD_1]) in LLM responses using the vault map returned by scrub_text.

ParameterTypeDescription
text *stringText containing placeholder tokens
vault *objectKey-value vault map from scrub_text

scrub_json

Recursively scrub PII and sensitive keys (password, secret, api_key, ssn) in a JSON object or array while preserving schema types.

ParameterTypeDescription
data *JSON object or array to sanitize
modestring