n8n-nodes-redactor 1.11.0 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +113 -376
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,417 +5,154 @@
5
5
  <h1 align="center">n8n-nodes-redactor</h1>
6
6
 
7
7
  <p align="center">
8
- <strong>Stop sending your customer data to OpenAI, Claude, and Gemini unprotected.</strong><br/>
9
- Built, maintained, and owned by <a href="https://next8n.com">next8n</a>
8
+ <strong>Keep personal data out of OpenAI, Claude and Gemini while your n8n AI workflows keep working.</strong><br/>
9
+ Built and maintained by <a href="https://next8n.com">next8n</a>
10
10
  </p>
11
11
 
12
12
  <p align="center">
13
- <a href="https://www.npmjs.com/package/n8n-nodes-redactor"><img src="https://img.shields.io/npm/v/n8n-nodes-redactor?style=for-the-badge&color=CB3837&label=npm" alt="npm version" /></a>
14
- <a href="https://www.npmjs.com/package/n8n-nodes-redactor"><img src="https://img.shields.io/npm/dt/n8n-nodes-redactor?style=for-the-badge&color=blue&label=downloads" alt="npm downloads" /></a>
15
- <a href="#license"><img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="MIT License" /></a>
16
- <a href="https://docs.npmjs.com/generating-provenance-statements"><img src="https://img.shields.io/badge/npm-Provenance_Signed-2ea44f?style=for-the-badge" alt="npm provenance" /></a>
17
- <img src="https://img.shields.io/badge/PII_Patterns-216-success?style=for-the-badge" alt="216 PII patterns" />
18
- <img src="https://img.shields.io/badge/Tests-437_Passed-brightgreen?style=for-the-badge" alt="437 tests passed" />
19
- <img src="https://img.shields.io/badge/Categories-11-success?style=for-the-badge" alt="11 categories" />
20
- <img src="https://img.shields.io/badge/Operations-7-success?style=for-the-badge" alt="7 operations" />
21
- <img src="https://img.shields.io/badge/n8n-2.x_Ready-FF6D5A?style=for-the-badge" alt="Tested on n8n 2.x" />
22
- <img src="https://img.shields.io/badge/Vault-AES--256--GCM_Encrypted-7B61FF?style=for-the-badge" alt="AES-256-GCM Vault" />
23
- <img src="https://img.shields.io/badge/Presidio-NLP_Optional-7B61FF?style=for-the-badge" alt="Presidio NLP" />
24
- <img src="https://img.shields.io/badge/Vault-Reversible-7B61FF?style=for-the-badge" alt="Reversible Vault" />
25
- <img src="https://img.shields.io/badge/GDPR-Art.30_ROPA_Record-00C4B4?style=for-the-badge" alt="GDPR Art.30 ROPA record" />
26
- <img src="https://img.shields.io/badge/100%25-Local_Processing-10A37F?style=for-the-badge" alt="100% Local" />
27
- <img src="https://img.shields.io/badge/n8n-Community_Node-FF6D5A?style=for-the-badge" alt="n8n Community Node" />
28
- <img src="https://img.shields.io/badge/AI_Agent-Compatible-10A37F?style=for-the-badge" alt="AI Agent Compatible" />
29
- <img src="https://img.shields.io/badge/TypeScript-Strict-3178C6?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript" />
30
- <img src="https://img.shields.io/badge/Maintained-Active-brightgreen?style=for-the-badge" alt="Actively Maintained" />
13
+ <a href="https://www.npmjs.com/package/n8n-nodes-redactor"><img src="https://img.shields.io/npm/v/n8n-nodes-redactor?label=npm" alt="npm version" /></a>
14
+ <a href="https://www.npmjs.com/package/n8n-nodes-redactor"><img src="https://img.shields.io/npm/dm/n8n-nodes-redactor?label=downloads" alt="npm downloads" /></a>
15
+ <a href="https://github.com/mjmirza/n8n-nodes-redactor/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/mjmirza/n8n-nodes-redactor/ci.yml?branch=master&label=CI" alt="CI status" /></a>
16
+ <a href="https://www.npmjs.com/package/n8n-nodes-redactor#provenance"><img src="https://img.shields.io/badge/npm-provenance%20signed-brightgreen" alt="npm provenance" /></a>
17
+ <a href="#license"><img src="https://img.shields.io/npm/l/n8n-nodes-redactor" alt="MIT License" /></a>
18
+ <img src="https://img.shields.io/badge/PII%20patterns-216-blue" alt="216 PII patterns" />
19
+ <img src="https://img.shields.io/badge/n8n-self--hosted-FF6D5A" alt="Self-hosted n8n" />
31
20
  </p>
32
21
 
33
- ---
22
+ ## What you get
34
23
 
35
- ## Your customer data is leaving your server right now.
24
+ - **Personal data never reaches the model.** Emails, phone numbers, IBANs, card numbers, national IDs and 200 more kinds of data are swapped for safe tokens before the LLM call.
25
+ - **The answer still makes sense.** After the model replies, the node puts the real values back, so your output reads naturally.
26
+ - **Fewer false alarms.** Card numbers are Luhn checked, IBANs checksum verified, NHS numbers mod 11 validated, so random digits are left alone.
27
+ - **Proof for your records.** An optional audit report, and a GDPR Article 30 processing record built from each run.
28
+ - **No new vendor.** Everything runs inside your own n8n. No cloud service, no API key, no runtime dependency.
36
29
 
37
- Every time your n8n workflow sends a customer email, phone number, address, IBAN, or credit card to OpenAI or Claude - **that data is gone**. You don't control it anymore. Your customer didn't consent to it. And under GDPR, **you're liable**.
30
+ ## From install to first result
38
31
 
39
- You know this is a problem. Your clients know it too. But rebuilding every workflow to strip PII manually? That's weeks of work nobody has time for.
32
+ 1. In n8n open **Settings**, then **Community Nodes**, enter `n8n-nodes-redactor` and install.
33
+ 2. Add a **Redactor** node before your OpenAI, Claude or Gemini node and set the operation to **Redact**.
34
+ 3. Add a second **Redactor** node after the model and set it to **Restore**.
35
+ 4. Run the workflow. Both nodes share the execution ID as Session ID, so a full run works with no extra setup. When testing one node at a time, set the same fixed Session ID, for example `test-1`, on both.
40
36
 
41
- **This node fixes it in 2 minutes.**
37
+ The model receives tokens instead of personal data.
42
38
 
43
- Drop it between your data source and your LLM node. It automatically detects and replaces 216 kinds of sensitive data with safe tokens. The LLM processes the clean data. Then the node swaps the original values back in. Your customer data never leaves your server.
44
-
45
- No cloud service. No API keys. No third-party dependency. Everything runs locally on your machine.
46
-
47
- <p align="center">
48
- <a href="https://services.next8n.com"><img src="https://img.shields.io/badge/Need_Help_Setting_Up%3F-Book_a_Free_Call-FF6D5A?style=for-the-badge&logoColor=white" alt="Book a consultation" /></a>
49
- </p>
50
-
51
- ---
52
-
53
- ## How it works
54
-
55
- ```
56
- [Your Data] --> [PII Redactor: REDACT] --> [OpenAI / Claude / Gemini] --> [PII Redactor: RESTORE] --> [Clean Output]
57
- ```
58
-
59
- **Before the LLM sees it:**
60
39
  ```json
61
- {
62
- "message": "Mrs. Sarah Johnson (sarah@bigcorp.com) reported a billing issue. SSN: 987-65-4321"
63
- }
40
+ { "message": "[PERSON_0] ([EMAIL_1]) reported a billing issue. SSN [SSN_2]" }
64
41
  ```
65
42
 
66
- **What the LLM actually receives:**
67
- ```json
68
- {
69
- "message": "[PERSON_0] ([EMAIL_1]) reported a billing issue. SSN: [SSN_2]"
70
- }
71
- ```
43
+ After Restore, your workflow gets the real values back.
72
44
 
73
- **After the LLM responds, the node restores everything automatically:**
74
45
  ```json
75
- {
76
- "reply": "I've resolved the billing issue for Mrs. Sarah Johnson. A confirmation has been sent to sarah@bigcorp.com."
77
- }
78
- ```
79
-
80
- The LLM never saw the real data. Your customer never knew the difference.
81
-
82
- ---
83
-
84
- ## What it detects (216 patterns across 11 categories)
85
-
86
- ### Contact Information
87
- | Type | Examples |
88
- |------|----------|
89
- | Email | `john@company.com`, `user+tag@sub.domain.co.uk` |
90
- | Phone | `(555) 123-4567`, `+49 30 1234-5678` |
91
- | UK Phone | `020 7946 0958`, `+44 7911 123456` |
92
- | Person Names | `Mr. John Smith`, `Dr. Anna Wilson`, `Frau Weber`, `Señor García` |
93
-
94
- ### Financial Data
95
- | Type | Validation |
96
- |------|------------|
97
- | Credit Cards | Luhn algorithm verified - rejects random 16-digit numbers |
98
- | IBAN | ISO 13616 checksum verified - rejects invalid checksums |
99
- | BIC/SWIFT | `DEUTDEFF`, `DEUTDEFF500` |
100
- | EU VAT Numbers | All 27 EU member states covered |
101
- | UK Bank Accounts | Sort code + account number |
102
-
103
- ### Government IDs
104
- | Type | Coverage |
105
- |------|----------|
106
- | US SSN | `123-45-6789` |
107
- | US/EU Passports | `C12345678`, `AB1234567` |
108
- | UK NHS Numbers | With mod-11 checksum validation |
109
- | German National ID | 10-character format |
110
- | US EIN | `12-3456789` |
111
- | US Driver License | Common format |
112
-
113
- ### Network & Digital
114
- | Type | Examples |
115
- |------|----------|
116
- | IPv4 / IPv6 | `192.168.1.1`, full IPv6 |
117
- | MAC Addresses | `00:1A:2B:3C:4D:5E` |
118
- | URLs | Any `http://` or `https://` URL |
119
- | Bitcoin Addresses | Legacy (`1...`) and Bech32 (`bc1...`) |
120
- | Ethereum Addresses | `0x742d35Cc...` |
121
-
122
- ### Location & Dates
123
- | Type | Examples |
124
- |------|----------|
125
- | US ZIP Codes | `90210`, `90210-1234` |
126
- | UK Postcodes | `SW1A 1AA`, `EC1A1BB` |
127
- | GPS Coordinates | `51.5074, -0.1278` |
128
- | Dates | `15/03/1990`, `2024-03-15`, `15.03.1990` |
129
- | Dates of Birth | `DOB: 15/03/1990` |
130
-
131
- ### Medical & Compliance
132
- | Type | Examples |
133
- |------|----------|
134
- | Medical Record Numbers | `MRN: 12345678`, `MRN#987654` |
135
-
136
- ### Government IDs (25+ countries)
137
- | Country | Types |
138
- |---------|-------|
139
- | USA | SSN, ITIN, EIN, Driver License (contextual), Passport |
140
- | Canada | SIN (Luhn validated) |
141
- | UK | NINO, NHS (mod-11 checksum), Passport |
142
- | Germany | Personalausweis, Steuer-ID, Sozialversicherungsnummer, Reisepass, Handelsregister (HRB) |
143
- | Austria | Sozialversicherungsnummer (date validated) |
144
- | Switzerland | AHV/AVS number |
145
- | France | NIR (social security) |
146
- | Italy | Codice Fiscale, Carta d'Identita |
147
- | Spain | DNI, NIE, NIF |
148
- | Netherlands | BSN (11-check validated) |
149
- | Belgium | Rijksregisternummer |
150
- | Poland | PESEL (checksum validated) |
151
- | Sweden | Personnummer |
152
- | Norway | Fodselsnummer |
153
- | Denmark | CPR-nummer |
154
- | Finland | Henkilotunnus (HETU) |
155
- | Portugal | NIF (checksum validated) |
156
- | Ireland | PPS Number |
157
- | Australia | TFN (checksum validated), Medicare |
158
- | New Zealand | IRD Number |
159
- | Japan | My Number |
160
- | South Korea | RRN |
161
- | Singapore | NRIC/FIN |
162
- | India | Aadhaar, PAN |
163
- | Brazil | CPF |
164
-
165
- ### Enterprise and Infrastructure
166
- | Type | Examples |
167
- |------|----------|
168
- | Internal Hostnames | `server-web-01.internal`, `db-prod.corp.local`, `nas.lan` |
169
- | Windows UNC Paths | `\\fileserver\shared\docs` |
170
- | LDAP Distinguished Names | `CN=John,OU=Users,DC=corp,DC=local` |
171
- | Active Directory Users | `CORP\jsmith` |
172
- | Private IPs (RFC 1918) | `10.0.1.50`, `172.16.0.1`, `192.168.1.1` |
173
- | Database Connection Strings | JDBC, MongoDB, PostgreSQL, MySQL, Redis, MSSQL |
174
- | API Keys | AWS (`AKIA...`), GCP (`AIza...`), Stripe, OpenAI, GitHub, Slack |
175
- | Auth Tokens | Bearer tokens, JWT tokens |
176
- | Cryptographic Material | PEM private keys, SSH public keys |
177
- | Secrets in Config | `password=`, `api_key=`, `secret=`, `token=` patterns |
178
- | Azure Keys | Storage keys, SAS tokens |
179
- | Slack Webhooks | `hooks.slack.com/services/...` |
180
-
181
- ### Vehicle
182
- | Type | Examples |
183
- |------|----------|
184
- | VIN | `1HGBH41JXMN109186` (17-character) |
185
- | License Plates | German (`M AB 1234`), UK (`AB12 CDE`), French (`AB-123-CD`) |
186
-
187
- ### Biometric and Digital Identity
188
- | Type | Examples |
189
- |------|----------|
190
- | UUID/GUID | `550e8400-e29b-41d4-a716-446655440000` |
191
- | Social Media Handles | `@username` |
192
- | IMEI | Device identifiers |
193
- | ICCID | SIM card numbers |
194
-
195
- ### Custom Business Identifiers
196
- Add your own patterns for anything specific to your business:
197
- | Example | Regex |
198
- |---------|-------|
199
- | Order IDs | `ORD-\d{6}` |
200
- | SKU Codes | `SKU-[A-Z0-9]{8}` |
201
- | Ticket Numbers | `TICKET-\d+` |
202
-
203
- ---
204
-
205
- ## 7 Operations: When to use what
206
-
207
- | Operation | When to use it | What it does | Example workflow |
208
- |-----------|---------------|-------------|-----------------|
209
- | **Redact** | Before sending data to an LLM, API, or third-party service | Detects and replaces all sensitive data with safe tokens. Stores originals in vault for later restoration. Also includes prompt injection detection. | `[Data Source] > Redact > [OpenAI] > Restore > [Output]` |
210
- | **Restore** | After the LLM or service has processed the tokenized data | Swaps all tokens back to original values using the vault. Your output has real data again. | Place after your LLM node, before the final output. |
211
- | **Detect** | Compliance audits, data assessment, before deciding to redact | Scans all data for sensitive information and returns a full report. Does NOT modify the data. Use this to understand what PII exists. | `[Data Source] > Detect > [If PII found] > Redact` |
212
- | **Verify** | After redaction, to confirm nothing leaked through | Re-scans redacted output to check if any PII slipped past. Returns PASS or FAIL with details of any leaks. Defense-in-depth. | `[Data Source] > Redact > [LLM] > Verify > [Alert if FAIL]` |
213
- | **Classify** | Data governance, sensitivity labeling, routing decisions | Assigns sensitivity labels (PUBLIC / INTERNAL / CONFIDENTIAL / RESTRICTED) based on what PII categories are found. Includes escalation rules. | `[Data Source] > Classify > [If RESTRICTED] > Block` |
214
- | **Purge** | GDPR right to erasure, cleanup, end of workflow | Deletes vault sessions from memory or disk, so no PII mapping is left behind. Supports GDPR Article 17 (right to erasure) requests. | `[End of workflow] > Purge` |
215
- | **Stats** | Debugging, monitoring, admin | Shows all active vault sessions with entry counts, creation times, TTL, and vault storage type. | Run manually to inspect vault state. |
216
-
217
- **ROPA record (a Redact option, not a separate operation):** turn on *Include Audit Report*, then *Include GDPR Art.30 ROPA Record*, and fill in the controller details. The report output then carries a Records of Processing Activities entry built from this run.
218
-
219
- **Recommended workflow for production:**
220
- ```
221
- [Data Source] > Detect (assess) > Redact (protect) > [LLM] > Verify (confirm) > Restore (recover) > [Output] > Purge (cleanup)
46
+ { "reply": "I resolved the billing issue for Mrs. Sarah Johnson and sent a confirmation to sarah@bigcorp.com." }
222
47
  ```
223
48
 
224
- ---
225
-
226
- ## 7 Redaction Modes
227
-
228
- Choose the right mode for your use case:
229
-
230
- | Mode | Output | Reversible? | Best for |
231
- |------|--------|-------------|----------|
232
- | **Token** | `[EMAIL_0]` | Yes | LLM workflows (recommended) |
233
- | **Mask** | `j***@e***.com` | No | Logs, dashboards, support tickets |
234
- | **Hash** | `[EMAIL:a3f2b8c91d4e]` | No | Analytics, deduplication |
235
- | **Redact** | `[REDACTED]` | No | Maximum privacy, audit trails |
236
- | **Pseudonymize** | `sarah.miller@example.com` | Yes | GDPR pseudonymization, demo data, QA environments |
237
- | **Blackout** | `████████` | No | Visual censoring, document redaction, like a black marker |
238
- | **Remove** | *(empty string)* | No | Complete deletion, no trace left, total removal |
239
-
240
- ---
49
+ ## Compatibility
241
50
 
242
- ## Smart features that matter
51
+ | Environment | Status |
52
+ |---|---|
53
+ | Self-hosted n8n 1.x and 2.x | Supported |
54
+ | n8n Cloud | Not available |
55
+ | n8n verified community nodes | Not eligible |
243
56
 
244
- ### Deduplication
245
- When the same email appears in 5 fields, it gets the same token (`[EMAIL_0]`) everywhere. The LLM understands it's the same person. Relationships in your data are preserved.
57
+ The persistent vault, encrypted vault files and JSONL audit log write to the local disk. n8n Cloud and n8n's verification program do not allow community nodes to use the file system, so this node is self-hosted only by design.
246
58
 
247
- ### Field Targeting
248
- Don't want to scan internal IDs or metadata? Use allowlist or denylist mode:
249
- - **Allowlist:** Only scan `user.email`, `*.phone`, `contacts[*].name`
250
- - **Denylist:** Skip `internalId`, `metadata.*`, `debug`
59
+ ## Operations
251
60
 
252
- ### Persistent Vault
253
- Choose between in-memory (fast, lost on restart) or file-based vault (survives n8n restarts). File vault stores mappings in `~/.n8n/pii-vault/`. Sessions auto-expire based on TTL.
61
+ | Operation | Use it when | What it does |
62
+ |---|---|---|
63
+ | Redact | Before an LLM, API or third party | Replaces sensitive values with tokens, stores originals in the vault, and checks the input for prompt injection |
64
+ | Restore | After the model or service replies | Swaps tokens back to the original values |
65
+ | Detect | Assessing data before deciding | Reports what personal data exists without changing anything |
66
+ | Verify | After redaction | Rescans the output and returns PASS or FAIL with any leaked values |
67
+ | Classify | Governance and routing | Labels data PUBLIC, INTERNAL, CONFIDENTIAL or RESTRICTED |
68
+ | Purge | Erasure requests and cleanup | Deletes vault sessions from memory or disk, supporting GDPR Article 17 |
69
+ | Stats | Debugging | Lists active vault sessions with entry counts and TTL |
254
70
 
255
- ### Session TTL
256
- Vault sessions auto-expire after 60 minutes by default. No unbounded memory growth. Configurable per workflow.
71
+ The recommended production chain looks like this.
257
72
 
258
- ### Audit Report
259
- Enable the second output to get a full compliance trail:
260
- ```json
261
- {
262
- "totalHits": 7,
263
- "hitsByCategory": { "contact": 3, "identity": 2, "financial": 2 },
264
- "hitsByPattern": { "EMAIL": 2, "PHONE": 1, "SSN": 1, "CREDIT_CARD": 1, "PERSON": 2 },
265
- "hits": [...]
266
- }
267
73
  ```
268
-
269
- ### Validation - Not Just Regex
270
- Credit card numbers are **Luhn-checked**. IBANs are **checksum-verified** (ISO 13616). NHS numbers pass **mod-11 validation**. This means fewer false positives and less over-redaction that kills your LLM output quality.
271
-
272
- ---
273
-
274
- ## Installation
275
-
276
- ### From n8n (Recommended)
277
- 1. Go to **Settings > Community Nodes**
278
- 2. Enter `n8n-nodes-redactor`
279
- 3. Click **Install**
280
- 4. Done. The "Redactor" node appears in your node palette.
281
-
282
- ### Manual
283
- ```bash
284
- cd ~/.n8n/nodes
285
- npm install n8n-nodes-redactor
286
- # Restart n8n
74
+ Data source > Detect > Redact > LLM > Verify > Restore > Output > Purge
287
75
  ```
288
76
 
289
- ---
290
-
291
- ## Quick Start (2 minutes)
292
-
293
- 1. **Install** the node
294
- 2. **Add "Redactor"** to your workflow, set operation to **Redact**
295
- 3. **Connect it** before your OpenAI/Claude/Gemini node
296
- 4. **Add another "Redactor"** after the LLM node, set operation to **Restore**
297
- 5. Both nodes share the same Session ID (defaults to the execution ID, so a full run works automatically). Testing one step at a time? Set the same fixed Session ID, for example `test-1`, on both nodes.
298
- 6. **Run your workflow.** Customer data stays on your server.
299
-
300
- That's it. No configuration needed for the default case.
301
-
302
- ---
303
-
304
- ## Who this is for
305
-
306
- - **n8n consultants** building AI workflows for clients who ask "is our data safe?"
307
- - **Agencies** delivering GDPR-compliant automation for EU clients
308
- - **Companies** processing customer support tickets, emails, or documents through LLMs
309
- - **Healthcare** organizations that need HIPAA compliance before sending data to AI
310
- - **Anyone** who lies awake thinking about what happens when customer data hits an external API
311
-
312
- ---
313
-
314
- ## We build GDPR-compliant AI workflows. For a living.
315
-
316
- We've delivered n8n + AI automation for clients across **e-commerce**, **healthcare**, **financial services**, and **consulting**. The GDPR question around client data hitting external APIs keeps coming up. We built this node because we needed it for real client projects.
317
-
318
- **This node exists because we solve this problem every day.**
319
-
320
- If you need help setting up PII-safe AI workflows, custom redaction rules, or end-to-end GDPR-compliant automation - we've done it before and would be happy to do it for you.
77
+ ## Redaction modes
321
78
 
322
- <p align="center">
323
- <a href="https://services.next8n.com"><img src="https://img.shields.io/badge/Book_a_Free_Consultation-services.next8n.com-FF6D5A?style=for-the-badge&logoColor=white" alt="Book a consultation" /></a>
324
- </p>
325
-
326
- <p align="center">
327
- <a href="https://next8n.com"><strong>next8n.com</strong></a> &nbsp;|&nbsp; <a href="https://services.next8n.com"><strong>Schedule a call</strong></a>
328
- </p>
329
-
330
- ---
331
-
332
- ## Enterprise Features
333
-
334
- ### 7 Redaction Modes
335
79
  | Mode | Output | Reversible | Best for |
336
- |------|--------|------------|----------|
337
- | **Token** | `[EMAIL_0]` | Yes | LLM workflows |
338
- | **Mask** | `j***@e***.com` | No | Logs, dashboards |
339
- | **Hash** | `[EMAIL:a3f2b8c91d4e]` | No | Analytics |
340
- | **Redact** | `[REDACTED]` | No | Maximum privacy |
341
- | **Pseudonymize** | `sarah.miller@example.com` | Yes | GDPR pseudonymization, demo data, QA |
342
- | **Blackout** | `████████` | No | Visual censoring, like a black marker |
343
- | **Remove** | *(empty string)* | No | Complete deletion, no trace left |
344
-
345
- ### Confidence Scoring and Threshold
346
- Every detection gets a confidence score (0.0 to 1.0). Set a threshold to only redact high-confidence matches. Checksum-validated patterns (credit cards, IBANs) score 0.95. Broad patterns score lower. Reduces false positives by up to 50%.
347
-
348
- ### Allow and Deny Lists
349
- - **Allow List**: Values to NEVER redact (company email domains, public phone numbers)
350
- - **Deny List**: Values to ALWAYS redact (project codenames, internal secrets)
351
-
352
- ### Prompt Injection Detection
353
- Scans input data for 25+ prompt injection patterns before it reaches an LLM. Detects instruction overrides, jailbreaks, delimiter escapes, encoded payloads, and zero-width character injection. Returns BLOCK/FLAG/CLEAN with a composite threat score.
354
-
355
- ### Data Classification
356
- Assigns sensitivity labels (PUBLIC / INTERNAL / CONFIDENTIAL / RESTRICTED) based on what PII categories are found. Escalation rules: 10+ CONFIDENTIAL hits escalate to RESTRICTED. Maps directly to enterprise data governance policies.
357
-
358
- ### Vault Encryption (AES-256-GCM)
359
- Encrypt vault files at rest with a passphrase. Each tenant uses a different passphrase for complete isolation. Even with filesystem access, encrypted files are unreadable without the key. scrypt key derivation resists brute-force attacks.
360
-
361
- ### Persistent Audit Log
362
- JSONL audit log of all redaction activity. Compatible with Splunk, ELK, Datadog. Daily rotation + 100MB size limit. Self-hosted n8n only. Helps you meet GDPR Art.30, HIPAA, SOX and PCI DSS record-keeping, which still depends on how you store and retain the files.
363
-
364
- ### GDPR Art.30 ROPA Report
365
- Adds a structured Records of Processing Activities entry to the Redact report output, covering the fields in GDPR Article 30(1): controller, purposes, legal basis, data subjects, personal data categories, recipients, retention, and security measures. Detection results fill it in, you supply the controller details in the node.
366
-
367
- ### Per-Tenant Profiles
368
- Coming in 2.0.0. Per-client redaction settings (patterns, allow and deny lists, threshold, mode) supplied as JSON in the node, so they work on n8n Cloud too. Earlier docs listed this as available; it was not reachable from the node and is being rebuilt.
369
-
370
- ---
371
-
372
- ## Enhanced NLP Detection (Optional Presidio Integration)
80
+ |---|---|---|---|
81
+ | Token | `[EMAIL_0]` | Yes | LLM workflows, the default |
82
+ | Pseudonymize | `sarah.miller@example.com` | Yes | Demo data, QA, GDPR pseudonymization |
83
+ | Mask | `j***@e***.com` | No | Logs and support tickets |
84
+ | Hash | `[EMAIL:a3f2b8c91d4e]` | No | Analytics and deduplication |
85
+ | Redact | `[REDACTED]` | No | Maximum privacy |
86
+ | Blackout | `████████` | No | Visual censoring |
87
+ | Remove | empty string | No | Leaving no trace |
88
+
89
+ ## What it detects
90
+
91
+ 216 patterns across 11 categories.
92
+
93
+ | Category | Examples |
94
+ |---|---|
95
+ | Contact | Email, international and UK phone numbers, titled person names |
96
+ | Financial | Credit cards (Luhn), IBAN (ISO 13616), BIC, EU VAT numbers, UK bank accounts |
97
+ | Government IDs | 25+ countries, including US SSN, UK NINO and NHS, German Steuer-ID and Personalausweis, Spanish DNI and NIE, Dutch BSN, Polish PESEL, Indian Aadhaar and PAN, Brazilian CPF |
98
+ | Network | IPv4, IPv6, MAC addresses, URLs, Bitcoin and Ethereum addresses |
99
+ | Location and dates | US ZIP, UK postcodes, GPS coordinates, dates and dates of birth |
100
+ | Medical | Medical record numbers |
101
+ | Infrastructure | Internal hostnames, UNC paths, LDAP names, connection strings, cloud API keys, JWTs, PEM keys, Slack webhooks |
102
+ | Vehicle | VIN, German, UK and French plates |
103
+ | Digital identity | UUIDs, social handles, IMEI, ICCID |
104
+ | Custom | Your own regex patterns, for example `ORD-\d{6}` |
105
+
106
+ ## Features in detail
107
+
108
+ | Feature | Detail |
109
+ |---|---|
110
+ | Deduplication | The same value gets the same token everywhere, so the model keeps relationships between fields |
111
+ | Field targeting | Allowlist or denylist paths such as `user.email`, `*.phone` or `metadata.*` |
112
+ | Vault | In memory, or file based in `~/.n8n/pii-vault/` so it survives restarts. Sessions expire after 60 minutes by default |
113
+ | Vault encryption | AES-256-GCM with scrypt key derivation, one passphrase per tenant |
114
+ | Confidence threshold | Each match carries a 0.0 to 1.0 score. Checksum validated patterns score 0.95 |
115
+ | Allow and deny lists | Values to never redact, such as your support address, and values to always redact, such as project codenames |
116
+ | Prompt injection check | 25+ patterns, including instruction overrides, delimiter escapes, encoded payloads and zero width characters. Returns BLOCK, FLAG or CLEAN |
117
+ | Audit report | A second output with hits by category and pattern |
118
+ | Audit log | JSONL with daily rotation and a 100 MB cap, readable by Splunk, ELK and Datadog |
119
+ | ROPA record | Turn on Include Audit Report, then Include GDPR Art.30 ROPA Record, and fill in the controller details |
120
+ | Presidio | Optional Microsoft Presidio container for names and organisations in free text. See [docs/PRESIDIO_SETUP.md](https://github.com/mjmirza/n8n-nodes-redactor/blob/master/docs/PRESIDIO_SETUP.md). Falls back to built-in patterns when unreachable |
121
+ | Per-tenant profiles | Planned for 2.0.0 as JSON settings in the node |
122
+
123
+ This node reduces what reaches a model. It is not legal advice and does not on its own make a workflow GDPR or HIPAA compliant.
124
+
125
+ ## For developers
126
+
127
+ | Area | Detail |
128
+ |---|---|
129
+ | Language | TypeScript, strict mode |
130
+ | Runtime dependencies | None. Only `n8n-workflow` as a peer |
131
+ | Tests | Jest, run on every push in CI |
132
+ | Node.js | 24, as pinned in `.nvmrc` and CI. Node 26 has no prebuilt `isolated-vm`, which `n8n-workflow` loads in tests |
373
133
 
374
- For users who need NLP-level accuracy in detecting person names, locations, and organizations in free text, the node optionally integrates with Microsoft Presidio (open source, MIT license).
375
-
376
- **What it adds:** Catches "Sarah Johnson" and "Goldman Sachs" in free text paragraphs that regex alone cannot detect.
377
-
378
- **Setup (one command):**
379
134
  ```bash
380
- docker run -d -p 5002:3000 mcr.microsoft.com/presidio-analyzer
135
+ npm ci
136
+ npm run typecheck
137
+ npm run lint
138
+ npm test
139
+ npm run build
381
140
  ```
382
141
 
383
- **In the node:** Toggle "Enhanced NLP Detection" to ON, enter `http://localhost:5002`. Done.
384
-
385
- **No Presidio? No problem.** The node works perfectly without it. Presidio is an optional upgrade for maximum accuracy. If the container is unreachable, the node falls back silently to regex-only detection.
386
-
387
- For docker-compose setup and language configuration, see [docs/PRESIDIO_SETUP.md](https://github.com/mjmirza/n8n-nodes-redactor/blob/master/docs/PRESIDIO_SETUP.md).
388
-
389
- ---
390
-
391
- ## Missing a use case? We'll build it for you.
392
-
393
- This node ships 216 built-in patterns. But every business has unique data: internal codes, proprietary identifiers, industry-specific formats.
394
-
395
- **You can add your own patterns directly in the node UI** using the Custom Patterns section. Define any regex, give it a label, and the engine will detect and redact it alongside the built-in patterns.
396
-
397
- If there is a specific use case that is not covered here and you want us to cover it so that everyone can benefit from it, or if you want a customized implementation built on top of this node, **reach out to us and we will be happy to enhance it accordingly.**
142
+ Project layout:
143
+ - `nodes/Redactor/` holds the node, the detection engine, patterns, vault and reports
144
+ - `test/` holds the Jest suites
145
+ - `tools/check-tarball.sh` makes sure only the built node ships to npm
146
+ - `.github/workflows/` holds CI and the signed publish workflow
398
147
 
399
- <p align="center">
400
- <a href="https://services.next8n.com"><img src="https://img.shields.io/badge/Request_a_Custom_Pattern_or_Feature-services.next8n.com-7B61FF?style=for-the-badge&logoColor=white" alt="Request a feature" /></a>
401
- </p>
402
-
403
- ---
148
+ Releases are cut by pushing a `vX.Y.Z` tag. The publish workflow tests, builds and publishes with npm provenance.
404
149
 
405
- ## Also by next8n
150
+ ## Support
406
151
 
407
- <p align="center">
408
- <a href="https://www.npmjs.com/package/n8n-nodes-xentral"><img src="https://img.shields.io/badge/n8n--nodes--xentral-30_Resources_|_163_Operations_|_58_Webhooks-00C4B4?style=for-the-badge" alt="n8n-nodes-xentral" /></a>
409
- </p>
410
-
411
- **[n8n-nodes-xentral](https://www.npmjs.com/package/n8n-nodes-xentral)** - The most comprehensive n8n community node for Xentral ERP. 30 resources, 163 operations, 58 webhook events. Full API audit verified. If you're automating Xentral workflows, this is the node you need.
412
-
413
- ---
152
+ - Custom patterns, new use cases or setup help go to [services.next8n.com](https://services.next8n.com)
153
+ - Bugs and feature requests go to [GitHub issues](https://github.com/mjmirza/n8n-nodes-redactor/issues)
154
+ - Also by next8n, [n8n-nodes-xentral](https://www.npmjs.com/package/n8n-nodes-xentral) for Xentral ERP
414
155
 
415
156
  ## License
416
157
 
417
- MIT. See [LICENSE](LICENSE). Copyright (c) 2026 Mirza Iqbal / [next8n](https://next8n.com).
418
-
419
- Free to use, modify and redistribute, including commercially, as long as the copyright notice stays in place. Provided "as is", without warranty. This node helps you reduce what reaches an LLM; it is not legal advice and does not by itself make a workflow GDPR or HIPAA compliant.
420
-
421
- For partnership or custom development: [services.next8n.com](https://services.next8n.com)
158
+ MIT. See [LICENSE](LICENSE). Copyright (c) 2026 Mirza Iqbal, [next8n](https://next8n.com).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-redactor",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "Redact, mask and anonymize PII before it reaches an LLM, then restore it. 216 patterns for emails, phones, addresses, IBAN, cards, names, SSN, passport and tax IDs. Reversible vault, GDPR Art.30 ROPA record, prompt-injection check. Runs locally. For n8n 2.x.",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",