Add whitelist config for masking exclusions (#53)
authorStefan Gasser <redacted>
Tue, 20 Jan 2026 20:52:02 +0000 (21:52 +0100)
committerGitHub <redacted>
Tue, 20 Jan 2026 20:52:02 +0000 (21:52 +0100)
commite3c4c300a6f970649bf40005c193d6e520eb4fb0
treefc7abab04a747642d96cb6516af0d521be814d7d
parent7cbf33c2dce90ecd4968c91a557e564268d38307
Add whitelist config for masking exclusions (#53)

Adds masking.whitelist config option to exclude specific text patterns
from PII masking. Useful for preventing false positives on known text
like company names or product identifiers.

- Add whitelist property to MaskingSchema (default: empty array)
- Add filterWhitelistedEntities function to filter detected PII
- Patterns match if detected text is contained in whitelist entry
  or whitelist entry is contained in detected text
config.example.yaml
src/config.ts
src/pii/detect.test.ts
src/pii/detect.ts
src/pii/mask.test.ts
src/providers/openai/stream-transformer.test.ts
git clone https://git.99rst.org/PROJECT