<?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>Forem: Arnab KarSarkar</title>
    <description>The latest articles on Forem by Arnab KarSarkar (@arnab_karsarkar_f7c29ac5d).</description>
    <link>https://forem.com/arnab_karsarkar_f7c29ac5d</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%2F3650700%2Ff58e71d3-3d22-46dc-929f-94cd639f5be6.jpg</url>
      <title>Forem: Arnab KarSarkar</title>
      <link>https://forem.com/arnab_karsarkar_f7c29ac5d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/arnab_karsarkar_f7c29ac5d"/>
    <language>en</language>
    <item>
      <title>I Built an Open-Source Privacy Firewall for ChatGPT (Runs 100% Locally)</title>
      <dc:creator>Arnab KarSarkar</dc:creator>
      <pubDate>Mon, 08 Dec 2025 00:19:40 +0000</pubDate>
      <link>https://forem.com/arnab_karsarkar_f7c29ac5d/i-built-an-open-source-privacy-firewall-for-chatgpt-runs-100-locally-4alc</link>
      <guid>https://forem.com/arnab_karsarkar_f7c29ac5d/i-built-an-open-source-privacy-firewall-for-chatgpt-runs-100-locally-4alc</guid>
      <description>&lt;p&gt;Every developer I know uses ChatGPT or Claude daily. And every CISO in every company is terrified about it — specifically of getting a compliance violation or customer data breach notification. &lt;/p&gt;

&lt;p&gt;Not because AI is bad — but because it's too easy to leak sensitive data without realizing it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customer emails&lt;/li&gt;
&lt;li&gt;API keys&lt;/li&gt;
&lt;li&gt;Logs with tokens&lt;/li&gt;
&lt;li&gt;Stack traces with secrets&lt;/li&gt;
&lt;li&gt;HR info&lt;/li&gt;
&lt;li&gt;Employee names / internal IDs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We’ve all pasted something into ChatGPT and thought:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“Wait… should I really be sending this?”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hence, I built PrivacyFirewall — an open-source, local-first privacy shield that blocks sensitive data before it is sent to any AI tool.&lt;/p&gt;

&lt;p&gt;👉 GitHub: &lt;a href="https://github.com/privacyshield-ai/privacy-firewall" rel="noopener noreferrer"&gt;https://github.com/privacyshield-ai/privacy-firewall&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Here is a screenshot of the block modal &amp;amp; the warning banner
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5psogjfczjkjl05oz6ww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5psogjfczjkjl05oz6ww.png" alt="Block Modal" width="800" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7u0qp709qbwingualfr9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7u0qp709qbwingualfr9.png" alt="Warning Banner" width="800" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🚨 The Problem: AI Prompts Are the New Data Leakage Vector
&lt;/h2&gt;

&lt;p&gt;Traditional DLP tools were built for email, file uploads, and network traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;They don't protect AI prompts.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you paste something into ChatGPT:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;It instantly leaves your browser&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Goes to a third-party server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And becomes part of your company's risk surface&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most leaks today aren't malicious; they're &lt;strong&gt;accidental&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Developers paste logs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Support teams paste customer messages&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HR pastes resumes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Engineers paste configs&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once it's pasted, it's gone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PrivacyFirewall acts before the send button&lt;/strong&gt;, giving you a chance to stop mistakes. The data never leaves your computer. &lt;/p&gt;

&lt;h3&gt;
  
  
  🔒 What PrivacyFirewall Does
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;✔ Blocks risky paste events (emails, API keys, credit card patterns, tokens)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;✔ Warns as you type when text looks sensitive&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;✔ Optional AI mode using a tiny local transformer (NER)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;✔ Zero cloud calls — everything is offline&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;✔ Chrome extension + optional local FastAPI agent&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;✔ Open source under MIT&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;This is not cloud DLP.&lt;/strong&gt;&lt;strong&gt;This is zero-trust, on-device protection.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Local Matters
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;✅ &lt;strong&gt;Compliance-friendly&lt;/strong&gt; - No data leaves your machine&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;✅ &lt;strong&gt;Zero latency&lt;/strong&gt; - Instant scanning, no network calls&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;✅ &lt;strong&gt;Works offline&lt;/strong&gt; - On flights, VPNs, air-gapped systems&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;✅ &lt;strong&gt;No subscription costs&lt;/strong&gt; - Run it forever, free&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🧠 How It Works
&lt;/h2&gt;

&lt;p&gt;PrivacyFirewall has two layers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhp8vpp4sowxfwki9n2pt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhp8vpp4sowxfwki9n2pt.png" alt="Simple architecture diagram showing Browser Mode vs Advanced Mode" width="800" height="1868"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Browser Mode (no setup needed)
&lt;/h3&gt;

&lt;p&gt;Works immediately after loading the Chrome extension.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Detects:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Email addresses&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Phone numbers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JWT tokens&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS keys&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Private key blocks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Credit card patterns&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IP addresses&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hash/API keys&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;This mode requires:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;❌ no Python&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;❌ no downloads&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;❌ no models&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;❌ no server&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just load the extension and you get instant protection.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Advanced Mode (local LLM)
&lt;/h3&gt;

&lt;p&gt;If you enable the optional backend (a FastAPI server running at 127.0.0.1:8765), PrivacyFirewall uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;dslim/bert-base-NER (&lt;a href="https://huggingface.co/dslim/bert-base-NER" rel="noopener noreferrer"&gt;local transformer&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No internet connection&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Local inference using Hugging Face&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;This catches:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;People's names&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Organizations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Locations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Contextual clues a regex can't detect&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the engine goes offline, PrivacyFirewall automatically &lt;strong&gt;falls back to Lite Mode&lt;/strong&gt; — so you're always protected.&lt;/p&gt;

&lt;h2&gt;
  
  
  🖥️ Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsq0hptrgwuf1f8qh7ari.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsq0hptrgwuf1f8qh7ari.gif" alt="Animated GIF showing 3 scenarios - email block, AWS key block, name detection" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Try pasting any of these into ChatGPT:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;john.doe@example.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ You'll see a "Email Detected" modal.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;AKIAIOSFODNN7EXAMPLE&lt;/code&gt;  `&lt;/p&gt;

&lt;p&gt;→ Blocked immediately as AWS Access Key.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ Caught as JWT token.&lt;/p&gt;

&lt;p&gt;&lt;code&gt; Meeting notes from Sarah Thompson at HR… &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ In Advanced Mode, the local transformer flags PERSON and warns you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This all happens locally inside your browser.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Quickstart
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Install the Chrome Extension (Lite Mode)
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;git clone https://github.com/privacyshield-ai/privacy-firewall.git  &lt;br&gt;
cd privacy-firewall &lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Load src/extension as an unpacked extension in Chrome.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. (Optional) Run the Local AI Engine
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
cd src/engine  &lt;br&gt;
python -m venv .venv  &lt;br&gt;
source .venv/bin/activate  &lt;br&gt;
pip install -r requirements.txt  &lt;br&gt;
uvicorn main:app --host 127.0.0.1 --port 8765&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Open ChatGPT → paste something sensitive → get warned.&lt;/p&gt;

&lt;p&gt;📖 Full instructions in the repo.&lt;/p&gt;

&lt;h2&gt;
  
  
  🏗️ Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Chrome Manifest V3&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Content scripts + background worker&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;FastAPI for the local agent&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hugging Face transformers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;dslim/bert-base-NER for on-device NER&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Regex engine for deterministic detection&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🧩 Current Focus / Roadmap
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;UI settings panel in the popup&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Custom detection rules&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Support for Slack/Jira/Notion AI&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Firefox support&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quantized models for speed (faster inference, smaller footprint)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Packaging the agent into a small desktop app (Windows/Mac/Linux)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Better redaction instead of blocking &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;If you want to help — PRs and ideas are welcome!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ❓ Common Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does this slow down my typing?&lt;/strong&gt;&lt;br&gt;
No! Detection runs asynchronously and doesn't block your workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I whitelist certain patterns?&lt;/strong&gt;&lt;br&gt;
Not yet, but it's on the roadmap as "Custom detection rules."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does it work with Claude/Gemini/other AI tools?&lt;/strong&gt;&lt;br&gt;
Yes! It monitors past events and text input across websites described in the manifest file.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤝 Open to Feedback
&lt;/h2&gt;

&lt;p&gt;I'd especially love feedback from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Security engineers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI safety folks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Chrome extension developers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;People who accidentally pasted sensitive data into ChatGPT 👀&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It Out 🚀
&lt;/h2&gt;

&lt;p&gt;⭐ &lt;strong&gt;Star the repo:&lt;/strong&gt; &lt;a href="https://github.com/privacyshield-ai/privacy-firewall" rel="noopener noreferrer"&gt;https://github.com/privacyshield-ai/privacy-firewall&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Share your feedback&lt;/strong&gt; in the issues&lt;br&gt;
&lt;strong&gt;Contribute&lt;/strong&gt; if you've got ideas&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Have you ever accidentally pasted something sensitive into an AI tool?&lt;/strong&gt;&lt;br&gt;
Let me know in the comments! 👇&lt;/p&gt;

&lt;p&gt;Thanks for reading — hope this helps make AI usage a little safer.&lt;/p&gt;

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