Repository navigation
First release of Discreet, a privacy gateway that lets teams use AI models on text containing Singapore personal data without sending that data to the model. Reviewed and approved by Michael Mendoza on 2026-10-06.
What it does
- OpenAI-compatible
POST /v1/chat/completions: any OpenAI client works by changingbase_url(checked with OpenAI's official Python library). - Placeholders: NRIC/FIN (including mistyped), phone, email, card, postal code, unit number and date of birth become
<NRIC_1>,<PHONE_1>… before the model sees them; values are restored in the answer. Cards are redacted and never restored. Values stay encrypted in memory for at most 10 minutes. - Purpose required; automated eligibility and benefits decisions are refused (HTTP 403) before any model call.
- Tamper-evident audit log: every request, allowed or refused, with keyed fingerprints instead of text;
discreet audit verifynames the first changed record; CSV export. - Money capped: the real model only for access-token holders, one pinned model, worst-case cost reserved against a daily budget (default US$0.20); everyone else gets a free mock.
- Demo page with four panes, and a container image ready for a mock-only public deployment.
Evidence
- 369/369 shared conformance cases (sg-pii-rules v0.2.0) in an independent Go implementation; 458 tests.
- Benchmark on 5,000 synthetic samples: 76.5% recall overall, 100% on every supported writing style, 92.3% precision; about 3 ms added per request, mostly the audit write (EVALS.md).
- Decision report: https://makoydev.github.io/discreet/m2-review/
Run it
docker build -t discreet . && docker run -p 8080:8080 -e DISCREET_HMAC_KEY="$(openssl rand -hex 32)" discreetThen open http://localhost:8080/. The public deployment follows once the Fly.io account exists (docs/DEPLOY.md).