The Pain of Masking PII for LLMs — And Why I Built a 100% Client‑Side Solution
说明与用途
MaskFlow AI 通过客户端处理,消除对 LLM 进行 PII 清理的手动步骤,并使用合成别名保持代码完整性,保障隐私。
问题
Developers repeatedly scrub sensitive data (API keys, emails, phone numbers) before sending code or logs to LLMs, then manually restore it from the AI’s response, creating a tedious privacy‑risk workflow.
结果
MaskFlow AI eliminates manual scrubbing, protects privacy by running entirely client‑side, and improves LLM accuracy with synthetic aliases, achieving up to 90% token savings via SchemaSlim.
工作流
- 1. Paste source text into MaskFlow AI web app or CLI. 2. Tool auto‑detects secrets via regex and Shannon entropy. 3. User optionally selects synthetic alias mode or custom regex. 4. MaskFlow replaces secrets with placeholders or aliases. 5. LLM processes masked text. 6. AI response is returned with placeholders/aliases. 7. One‑click restore replaces placeholders with original secrets.
- 8. For CLI users, run maskflow_cli.py on local files to sanitize repositories or logs instantly.
证据
Manually scrubbing API keys (sk_live_..., AIza...) and replacing them with xxxx.
MaskFlow AI — a 100% client‑side privacy tool that runs entirely in your browser's memory. No network traffic, no server uploads, zero API keys sent anywhere.
Shannon entropy (H(X) ≥ 3.85 bits/char) and character‑class transitions to automatically detect and mask high‑entropy unknown tokens.
Synthetic Alias Mode (Preserving LLM Code Accuracy) ... use valid syntax dummies like [email protected] or 10.240.0.1.
CLI & Offline Pro Pack for Power Users ... zero‑dependency Python CLI (maskflow_cli.py).
- 记录日期: 2026-10-19T18:56:08.621Z