# PII-Shield – Log Sanitization Sidecar with JSON Integrity (…

What PII-Shield does: It's a K8s sidecar (or CLI tool) that pipes application logs, detects secrets using Shannon entropy (catching unknown keys like "sk-live-..." without predefined patterns), and redacts them deterministically using HMAC. Why deterministic? So that "pass123" always hashes to the…

- **Page:** https://magpie.gallery/i/pii-shield-log-sanitization-sidecar-with-json-inte-zr6p
- **Type:** Link to an idea elsewhere
- **Category:** AI & dev
- **Runs on:** linux
- **Tags:** logs, pii, redaction, kubernetes, entropy

## Source

Web · aragoss: PII-Shield – Log Sanitization Sidecar with JSON Integrity (Go, Entropy)

- **Original:** https://news.ycombinator.com/item?id=46873308

> What PII-Shield does: It's a K8s sidecar (or CLI tool) that pipes application logs, detects secrets using Shannon entropy (catching unknown keys like "sk-live-..." without predefined patterns), and redacts them deterministically using HMAC. Why deterministic? So that "pass123" always hashes to the same "[HIDDEN:a1b2c]", allowing QA/Devs to correlate errors without seeing the raw data. Key features: 1. JSON Integrity: It parses JSON, sanitizes values, and rebuilds it. It guarantees valid JSON output for your SIEM (ELK/Datadog). 2. Entropy Detection: Uses context-aware entropy analysis to catch high-randomness strings. 3. Fail-Open: Designed as a transparent pipe wrapper to preserve app uptime. The project is open-source (Apache 2.0). Repo: https://github.com/aragossa/pii-shield Docs: https://pii-shield.gitbook.io/docs/ I'd love your feedback on the entropy/threshold logic! https://github.com/aragossa/pii-shield

## GitHub projects

- https://github.com/aragossa/pii-shield

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
