]> git.99rst.org Git - sgasser-llm-shield.git/commit
Replace Presidio with an open-source PII detector (#100) v0.5.0
authorStefan Gasser <redacted>
Mon, 22 Jun 2026 10:29:05 +0000 (12:29 +0200)
committerGitHub <redacted>
Mon, 22 Jun 2026 10:29:05 +0000 (12:29 +0200)
commit08ddb1d94911e59415d86460c0fd9e5baee12a4b
tree96956369166a2068fe6a63a292ccaa434717b88a
parent747caa2fa1c6ce50a0cb4264f636fb6f2c796cc2
Replace Presidio with an open-source PII detector (#100)

Replace the Microsoft Presidio analyzer with a self-hosted open-source PII detector (Python/FastAPI, detector/) shipped in the all-in-one image: multilingual GLiNER NER plus a deterministic regex/checksum layer for structured identifiers.

- Add VAT_CODE (EU VAT, checksum-validated); member-state prefixes only, case-insensitive and overlap-safe so a label or word can't hide a valid number.
- /api/mask: detect secrets before PII so a connection string isn't partly masked as an email (matches the provider routes).
- Rename presidio_url to detector_url; language-agnostic detection; CPU-only torch; detector CI (ruff/pyright/pytest).
- Bump version to 0.5.0.
53 files changed:
.conductor/settings.toml
.dockerignore [new file with mode: 0644]
.github/workflows/ci.yml
.github/workflows/release.yml
AGENTS.md
CONTRIBUTING.md
README.md
benchmarks/pii-accuracy/taxonomy.ts
benchmarks/pii-accuracy/test-data/core.yaml
benchmarks/pii-accuracy/test-data/precision.yaml
config.example.yaml
detector/.gitignore [new file with mode: 0644]
detector/detector/__init__.py [new file with mode: 0644]
detector/detector/app.py [new file with mode: 0644]
detector/detector/deterministic.py [new file with mode: 0644]
detector/detector/entities.py [new file with mode: 0644]
detector/detector/gliner_layer.py [new file with mode: 0644]
detector/detector/merge.py [new file with mode: 0644]
detector/pyproject.toml [new file with mode: 0644]
detector/tests/test_analyze.py [new file with mode: 0644]
detector/tests/test_deterministic.py [new file with mode: 0644]
detector/tests/test_gliner_layer.py [new file with mode: 0644]
detector/tests/test_merge.py [new file with mode: 0644]
docker-compose.yml
docker/Dockerfile
docker/presidio/generate-configs.py [deleted file]
docker/presidio/languages.yaml [deleted file]
docker/supervisord.conf
docs/api-reference/mask.mdx
docs/api-reference/status.mdx
docs/concepts/pii-detection.mdx
docs/configuration/overview.mdx
docs/configuration/pii-detection.mdx
docs/installation.mdx
docs/introduction.mdx
docs/quickstart.mdx
docs/use-cases/chat.mdx
docs/use-cases/coding-tools.mdx
package.json
src/config.test.ts
src/config.ts
src/constants/languages.ts
src/index.ts
src/pii/detect.test.ts
src/pii/detect.ts
src/routes/api.test.ts
src/routes/api.ts
src/routes/codex.test.ts
src/routes/health.test.ts
src/routes/health.ts
src/routes/info.ts
src/services/language-detector.ts
src/services/pii.ts
git clone https://git.99rst.org/PROJECT