{"by":"arnabkarsarkar","descendants":54,"id":46206591,"kids":[46231530,46233277,46232787,46232982,46238581,46231391,46247676,46238650,46241028,46232060,46231820,46234378,46231753,46231271,46232239,46231132,46235738,46231669,46233028,46236510,46232361,46233007,46231384,46206665],"score":111,"text":"OP here.<p>I built this because I recently caught myself almost pasting a block of logs containing AWS keys into Claude.<p>The Problem: I need the reasoning capabilities of cloud models (GPT&#x2F;Claude&#x2F;Gemini), but I can&#x27;t trust myself not to accidentally leak PII or secrets.<p>The Solution: A Chrome extension that acts as a local middleware. It intercepts the prompt and runs a local BERT model (via a Python FastAPI backend) to scrub names, emails, and keys before the request leaves the browser.<p>A few notes up front (to set expectations clearly):<p>Everything runs 100% locally.\nRegex detection happens in the extension itself.\nAdvanced detection (NER) uses a small transformer model running on localhost via FastAPI.<p>No data is ever sent to a server.\nYou can verify this in the code + DevTools network panel.<p>This is an early prototype.\nThere will be rough edges. I’m looking for feedback on UX, detection quality, and whether the local-agent approach makes sense.<p>Tech Stack:\n Manifest V3 Chrome Extension\n Python FastAPI (Localhost)\n HuggingFace dslim&#x2F;bert-base-NER\n Roadmap &#x2F; Request for Feedback:\nRight now, the Python backend adds some friction. I received feedback on Reddit yesterday suggesting I port the inference to transformer.js to run entirely in-browser via WASM.<p>I decided to ship v1 with the Python backend for stability, but I&#x27;m actively looking into the ONNX&#x2F;WASM route for v2 to remove the local server dependency. If anyone has experience running NER models via transformer.js in a Service Worker, I’d love to hear about the performance vs native Python.<p>Repo is MIT licensed.<p>Very open to ideas suggestions or alternative approaches.","time":1765296637,"title":"Show HN: Local Privacy Firewall-blocks PII and secrets before ChatGPT sees them","type":"story","url":"https://github.com/privacyshield-ai/privacy-firewall"}