{"repo":"packyme/privacy-filter","free":true,"listed":false,"github":"https://github.com/packyme/privacy-filter","clone":"git clone https://github.com/packyme/privacy-filter.git","description":"LLM privacy gateway in Go — millisecond-latency PII and secret redaction. Used in production by PackyCode.","language":"Go","stars":303,"topics":["ai-gateway","data-redaction","gitleaks","golang","grpc","http-server","llm-security","middleware","pii-detection","privacy"],"license":"MIT","category":"networking-infra","readme_excerpt":"Privacy Filter (Go) English 简体中文 Strip sensitive user data (PII / secrets) from text before it reaches an LLM. Pure Go, no model, no GPU, no CGO — a single static binary, millisecond latency on text of any length. 🌐 Running in production at PackyCode — the privacy-compliance component of an API relay service. --- Three ways to use it 1. Core package : import \"privacyfilter/filter\" straight into your gateway — redaction is one function call, no HTTP hop. 2. HTTP service : cmd/http , REST API. 3. gRPC service : cmd/grpc , interface in proto/filter.proto . The latter two are thin wrappers around the filter core package. --- Two detection layers Layer Covers Technique --- --- --- Structured PII Email, phone, national ID, bank card (Luhn-checked), IP Regex Secrets / credentials API keys, tokens, private keys, passwords written in prose, unknown high-entropy strings gitleaks ruleset (keyword pre-filter) + contextual regex + Shannon-entropy fallback Each layer emits (start, end, placeholder) spans → spans are merged and de-overlapped → the text is rebuilt in a single pass. Placeholders are typed and carry the entity kind — [邮箱] (email), [电话] (phone), [身份证] (national ID), [银行卡] (bank card), [IP] , [密钥] (secret) — and are irreversible (no un-redaction). No person / place / organization name recognition — that needs an NER model, which costs seconds of CPU time on long text and was removed per requirements. High-risk identity data (national ID, bank card, secrets, etc.) is fully cover","default_branch":null,"files":null,"tree":[],"storefront":"/r/packyme","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/packyme/privacy-filter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}