<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ilya Sib</title>
    <description>The latest articles on DEV Community by Ilya Sib (@moxno).</description>
    <link>https://dev.to/moxno</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3839014%2Fda567137-35bc-41fa-8e71-0d4b71cf58cd.jpeg</url>
      <title>DEV Community: Ilya Sib</title>
      <link>https://dev.to/moxno</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moxno"/>
    <language>en</language>
    <item>
      <title>How I Built a Zero-Server PII Scrubber for ChatGPT (It Works in Airplane Mode)</title>
      <dc:creator>Ilya Sib</dc:creator>
      <pubDate>Tue, 21 Apr 2026 05:22:16 +0000</pubDate>
      <link>https://dev.to/moxno/how-i-built-a-zero-server-pii-scrubber-for-chatgpt-it-works-in-airplane-mode-21gl</link>
      <guid>https://dev.to/moxno/how-i-built-a-zero-server-pii-scrubber-for-chatgpt-it-works-in-airplane-mode-21gl</guid>
      <description>&lt;p&gt;I got tired of seeing this workflow in every company I consulted for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Employee has a sensitive document (client contract, patient report, HR file)&lt;/li&gt;
&lt;li&gt;Employee needs AI help analyzing it&lt;/li&gt;
&lt;li&gt;Employee pastes the entire thing into ChatGPT&lt;/li&gt;
&lt;li&gt;Compliance team has a heart attack&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The usual advice — "just remove sensitive data before pasting" — doesn't work. It's too manual, too slow, and people simply don't do it under deadline pressure.&lt;/p&gt;

&lt;p&gt;So I built &lt;a href="https://www.privacyscrubber.com" rel="noopener noreferrer"&gt;PrivacyScrubber&lt;/a&gt; — a 100% local, browser-based PII redactor that works as a step between your document and your AI model.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Core Architecture
&lt;/h2&gt;

&lt;p&gt;The entire engine runs in client-side JavaScript. No server. No API calls. No logs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this matters:&lt;/strong&gt; You can literally disconnect from the internet and it still works. I call this the "Airplane Mode test" — if the tool breaks offline, it's sending your data somewhere.&lt;/p&gt;

&lt;h3&gt;
  
  
  Two-Pass Tokenization
&lt;/h3&gt;

&lt;p&gt;The PII engine uses a two-pass approach:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pass 1 — Detection:&lt;/strong&gt; Scan the text for all pattern matches across 60+ entity types.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pass 2 — Conflict Resolution:&lt;/strong&gt; Overlapping spans are resolved by specificity priority. An SSN match inside a phone number match — the more specific type (SSN) wins. Confidence scoring filters false positives.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reversible Redaction
&lt;/h3&gt;

&lt;p&gt;This is the key feature that makes it actually useful for AI workflows rather than just document archiving.&lt;/p&gt;

&lt;p&gt;Instead of permanently deleting PII, we replace it with typed tokens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input:  "Patient John Smith (DOB 03/15/1978, SSN 123-45-6789) visited Dr. Chen at 415-555-0192"

Output: "Patient [NAME_1] (DOB [DATE_1], SSN [SSN_1]) visited [NAME_2] at [PHONE_1]"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The mapping is stored locally in the browser. After the AI responds, paste the response into the "Reveal" panel and all tokens are replaced back with originals — locally, no server involved.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hard Parts
&lt;/h2&gt;

&lt;h3&gt;
  
  
  False Positive Hell
&lt;/h3&gt;

&lt;p&gt;The biggest challenge wasn't detecting PII — it was avoiding false positives.&lt;/p&gt;

&lt;p&gt;Examples of things that pattern-match as PII but aren't:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Version 1.2.3" → looks like a partial SSN pattern&lt;/li&gt;
&lt;li&gt;"Node.js" → matches partial email patterns&lt;/li&gt;
&lt;li&gt;"Dr. Smith Act" → "Dr." prefix triggers name detection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Solution: a confidence scoring system that weights context, entity type frequency, and co-occurrence patterns.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Chrome Extension Problem
&lt;/h3&gt;

&lt;p&gt;The Chrome Extension intercepts text in ChatGPT's input field &lt;em&gt;before&lt;/em&gt; you hit Enter. ChatGPT uses React with a &lt;code&gt;contenteditable&lt;/code&gt; div, not a standard &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;. Text must be intercepted at the &lt;code&gt;keydown&lt;/code&gt; event level.&lt;/p&gt;

&lt;p&gt;The solution uses a MutationObserver on the input container plus &lt;code&gt;keydown&lt;/code&gt; event capture to catch the Enter key before React's synthetic event system.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ship the boring compliance stuff first.&lt;/strong&gt; The HIPAA/GDPR angle unlocks enterprise conversations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Airplane Mode test is your marketing.&lt;/strong&gt; "Try it with WiFi off" is viscerally convincing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;False positive rate matters more than recall.&lt;/strong&gt; A PII tool that replaces half the words is useless for AI workflows.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Current Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Vanilla JS (no framework — Chrome extensions hate React)&lt;/li&gt;
&lt;li&gt;WebAssembly Tesseract for offline PDF OCR&lt;/li&gt;
&lt;li&gt;OffscreenCanvas API for in-browser image processing&lt;/li&gt;
&lt;li&gt;IndexedDB for PRO token persistence between sessions&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you're building something similar or have questions about the conflict resolution algorithm, I'm happy to dig in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.privacyscrubber.com" rel="noopener noreferrer"&gt;Try PrivacyScrubber&lt;/a&gt; — free, no signup, works offline.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>privacy</category>
      <category>security</category>
    </item>
    <item>
      <title>Why Pasting Client Data into ChatGPT is a GDPR Liability (and the Fix)</title>
      <dc:creator>Ilya Sib</dc:creator>
      <pubDate>Mon, 23 Mar 2026 09:32:21 +0000</pubDate>
      <link>https://dev.to/moxno/why-pasting-client-data-into-chatgpt-is-a-gdpr-liability-and-the-fix-2ajm</link>
      <guid>https://dev.to/moxno/why-pasting-client-data-into-chatgpt-is-a-gdpr-liability-and-the-fix-2ajm</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Published as:&lt;/strong&gt; Ilya, Founder of PrivacyScrubber — privacyscrubber.com&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Every week, I watch legal teams, HR professionals, and developers do something that makes compliance officers lose sleep: they paste client files — contracts, resumes, medical records, support tickets — straight into ChatGPT to summarize, draft, or analyze them.&lt;/p&gt;

&lt;p&gt;I get it. ChatGPT is genuinely useful. The problem isn't the AI. The problem is the data that rides along with your prompt.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Legal Reality Nobody Talks About
&lt;/h2&gt;

&lt;p&gt;Let me be specific. Under &lt;strong&gt;GDPR Article 28&lt;/strong&gt;, if you use an AI assistant to process personal data on behalf of clients or employees, you need a &lt;strong&gt;Data Processing Agreement (DPA)&lt;/strong&gt; with that AI provider. OpenAI offers a DPA — but only on their API (not ChatGPT Free), and you still bear the burden of proving lawful processing.&lt;/p&gt;

&lt;p&gt;More critically: &lt;strong&gt;Article 5(1)(f)&lt;/strong&gt; requires that personal data be processed with "appropriate security... and protection against unauthorised or unlawful processing." Pasting an unredacted client contract into a third-party AI system is hard to square with that requirement.&lt;/p&gt;

&lt;p&gt;This isn't hypothetical. The Italian DPA (Garante) temporarily banned ChatGPT in 2023 specifically over data processing transparency concerns. The EU AI Act, coming into force through 2026, adds enforcement teeth to AI data processing requirements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Even if you have a DPA&lt;/strong&gt;, you're still on the hook for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensuring the data you send is appropriate to send at all&lt;/li&gt;
&lt;li&gt;Logging and auditing what personal data left your environment&lt;/li&gt;
&lt;li&gt;Honoring data subject rights (erasure, portability) for anything processed in the AI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The moment a client's name, email, or ID lands in someone else's inference pipeline, your compliance posture weakens.&lt;/p&gt;




&lt;h2&gt;
  
  
  The "Incognito Chat" Illusion
&lt;/h2&gt;

&lt;p&gt;"But I turned on ChatGPT's privacy mode / temporary chat / incognito mode — my data isn't used for training."&lt;/p&gt;

&lt;p&gt;True: OpenAI's temporary chat doesn't use your conversation for model training. But that's a different claim from "your data never touches their servers."&lt;/p&gt;

&lt;p&gt;Every message you send — regardless of privacy settings — is processed server-side. It travels over the network, sits in RAM during inference, and is handled by OpenAI's infrastructure. For data that falls under GDPR, HIPAA, or SOC 2 requirements, "not used for training" is a much weaker guarantee than "never left the browser."&lt;/p&gt;

&lt;p&gt;This distinction matters enormously when your clients ask: &lt;em&gt;"How are you handling our data when you use AI?"&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What Zero-Trust Data Sanitization Means in Practice
&lt;/h2&gt;

&lt;p&gt;The approach I've been building toward — I call it &lt;strong&gt;Zero-Trust Data Sanitization (ZTDS)&lt;/strong&gt; — treats every AI session as potentially hostile to your clients' privacy. The rule is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;No personal data should leave your device before you send it to an AI model.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This means scrubbing PII from your text &lt;em&gt;before&lt;/em&gt; it becomes a prompt. Not after. Not with server-side filters you don't control. Before.&lt;/p&gt;

&lt;p&gt;Here's how ZTDS works in practice:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Input&lt;/strong&gt;: You paste a client contract, support ticket, or HR document&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Detect&lt;/strong&gt;: Every name, email, phone number, and ID is identified via regex (runs locally)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Replace&lt;/strong&gt;: Detected PII is swapped for tokens — &lt;code&gt;[NAME_1]&lt;/code&gt;, &lt;code&gt;[EMAIL_1]&lt;/code&gt;, &lt;code&gt;[PHONE_1]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Send&lt;/strong&gt;: You paste the &lt;em&gt;sanitized&lt;/em&gt; version into ChatGPT — no real data crosses the wire&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reverse&lt;/strong&gt;: When you get the AI's response, swap the tokens back to the originals (also locally)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The AI never sees the actual name — it sees &lt;code&gt;[NAME_1]&lt;/code&gt;. It still understands the structure, intent, and context of your document perfectly. And the token map that decodes &lt;code&gt;[NAME_1]&lt;/code&gt; back to the original? It lives only in your browser's session memory, wiped the moment you close the tab.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Airplane Mode Test (Your Compliance Proof)
&lt;/h2&gt;

&lt;p&gt;Here's the clearest way to verify whether a privacy tool actually honors zero-trust principles:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Load the page → Disconnect from the internet → Try to use it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the tool still works offline: the processing is genuinely local. No data left your device. Your client data never touched a server.&lt;/p&gt;

&lt;p&gt;If the tool breaks offline: it's making network calls. Which means your data is traveling somewhere, regardless of what the privacy policy says.&lt;/p&gt;

&lt;p&gt;This is the test I require every privacy tool to pass before I recommend it. It's also the test I built PrivacyScrubber to satisfy — you can confirm it yourself, right now, by switching to airplane mode after the page loads.&lt;/p&gt;




&lt;h2&gt;
  
  
  The GDPR Audit Checklist for AI Sessions
&lt;/h2&gt;

&lt;p&gt;If you're using AI tools with client data today, here's a 5-step framework to reduce your exposure:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Classify before you paste&lt;/strong&gt;&lt;br&gt;
Does this document contain personal data (names, contacts, IDs, health info, financial data)? If yes, it needs scrubbing before it enters any AI prompt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Check your DPA coverage&lt;/strong&gt;&lt;br&gt;
Do you have a valid DPA with every AI vendor whose models process your prompts? ChatGPT Free = no DPA. Claude API = yes if you signed it. Copilot Enterprise = covered under Microsoft's DPA.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Verify client-side processing claims&lt;/strong&gt;&lt;br&gt;
Apply the Airplane Mode test to any tool claiming to process data locally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Log what you send&lt;/strong&gt;&lt;br&gt;
Even when using scrubbed data, keep a log of session types (not content). "Summarized HR onboarding document, no PII in prompt" is defensible. Mystery AI sessions are not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Honor data subject rights&lt;/strong&gt;&lt;br&gt;
If a client asks "what data did you process about me using AI?" — can you answer? If you've been sending raw documents, you probably can't.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Request from the Dev Community
&lt;/h2&gt;

&lt;p&gt;This article focuses on ChatGPT because it's ubiquitous, but the same logic applies to Claude, Gemini, Copilot, and every other hosted AI model.&lt;/p&gt;

&lt;p&gt;There are real solutions here — both technical (regex scrubbers, local models, differential privacy) and procedural (DPAs, audit logs, data classification workflows). I'm biased toward client-side tools because I've found no other approach that satisfies the Airplane Mode test, but the broader conversation matters.&lt;/p&gt;

&lt;p&gt;If you're building in this space — privacy-preserving AI pipelines, local inference, differential privacy for LLMs — I'd genuinely like to hear from you in the comments. And if you're using AI with client data today without a sanitization step, I'd encourage a second look.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Ilya is the founder of &lt;a href="https://privacyscrubber.com" rel="noopener noreferrer"&gt;PrivacyScrubber.com&lt;/a&gt; — a browser-based PII sanitizer for AI workflows that specifically passes the airplane mode test. A deeper technical breakdown for enterprise teams is available in the &lt;a href="https://privacyscrubber.com/ciso-ai-guide" rel="noopener noreferrer"&gt;CISO AI Data Security Guide&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>privacy</category>
      <category>security</category>
      <category>gdpr</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
