Redaction (Scrub)

Cresset includes a small tool that swaps secrets and personal data for placeholders, so text is safer to paste into a chat, a ticket or a log. It runs entirely on your machine. It makes no network requests.

Hi, I'm Ada (ada@example.com, 555-123-4567). DB_PASSWORD=hunter2xyz. For Project Falcon.

becomes

Hi, I'm Ada (<EMAIL_1>, <PHONE_1>). DB_PASSWORD=<SECRET_1>. For <TERM_1>.

Paste the reply you get back and restore it, and the placeholders turn back into the real values.

On the command line

node cresset.js redact notes.txt --term "Project Falcon" --map key.json

To put the real values back:

node cresset.js restore reply.txt --map key.json

In the browser

The Scrub page does the same thing. It makes no network requests and stores nothing, which you can confirm in your browser's Network tab.

What it finds

KindExamples
EMAILada@example.com
PHONE, SSN(555) 123-4567, 123-45-6789
CREDIT_CARDNumbers that pass the card checksum
IP_ADDRESS192.168.1.20 (not 127.0.0.1)
USER_PATHThe user name in C:\Users\Ada\... or /home/ada/...
SECRETThe value after password=, api_key:, token= and similar
API_KEY, GITHUB_TOKEN, AWS_KEY, SLACK_TOKEN, JWT, BEARER_TOKENCommon key and token shapes
PRIVATE_KEYA whole -----BEGIN ... PRIVATE KEY----- block
URL_PASSWORDThe password in postgres://user:pass@host
HIGH_ENTROPYLong random-looking strings
TERMAnything you list with --term

The same value always gets the same placeholder, so <EMAIL_1> means the same address everywhere in the text.

What it is not

Be clear about the limits.

Next

The complete lists of commands, functions and methods: Reference.