UNPKG

yahdlp

Version:

Enterprise-grade PII detection and redaction tool by Yahya Enterprises

65 lines (52 loc) 1.62 kB
# PII Detection and Redaction Examples ## Initial Image Scan ### Command ```bash ./index.js redact sms-wa-test.png output.png -p ``` ![](sms-wa-test.png) ### Response ```plaintext (node:5051) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) No matching PII found ``` ## Phone Number Detection ### Command ```bash ./index.js inspect -t "+41313131313" -p ``` ### Response ```json [ { "type": "PHONE", "value": "+41313131313", "normalized": "41313131313" } ] ``` ## Successful Image Redaction ### Command ```bash ./index.js redact sms-wa-test.png output.png -p ``` ### Response ```plaintext (node:5478) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) Found and redacted PII ``` ![](output.png) ## Key Points - The sequence demonstrates a complete PII detection and redaction workflow: 1. Initial image scan (no PII detected) 2. Phone number pattern verification 3. Successful image redaction with PII detection - The tool consistently shows deprecation warnings for the `punycode` module - The final run successfully identified and redacted PII from the image - Both inspection and redaction commands use the `-p` flag for phone number detection ## Command Reference - `inspect -t`: Inspects text for PII - `redact`: Processes images for PII redaction - Input/Output format: `redact [input-image] [output-image]`