Omna unified PII/secret detection engine (L1–L6) — compiled Rust kernel with in-process on-device AI. Binary-only.
Project description
omna-pii-mask
The compiled detection engine behind Omna's PII features. This is the same unified Rust kernel that ships in the Omna Mac app and browser extension, exposed to Python as a single self-contained wheel.
It is the backend for pip install "omna[pii]" — you normally don't install it
directly; the omna package depends on it.
What it does
A six-layer (L1–L6) detection pipeline over text:
- Regex + rule layers — emails, phone numbers, cards, URLs, and 220+ secret rules (AWS keys, GitHub tokens, JWTs, …) with entropy checks.
- Checksum-validated IDs — Luhn, IBAN, Verhoeff, NHS, and 30+ international formats, so a string that merely looks like an ID isn't flagged unless it validates.
- On-device AI (L3) — an optional ONNX model that catches contextual PII regex can't (e.g. a bare prose name). Runs in-process on the same ONNX Runtime the wheel already links; downloads once on first use.
API
import omna_pii_mask
omna_pii_mask.mask("Email john@acme.com", model=False) # -> {"masked": "...", "tokens": {...}}
omna_pii_mask.detect("SSN 123-45-6789") # -> [{"entity": ..., "confidence": ...}, ...]
omna_pii_mask.restore(masked_text, tokens) # reverse the reversible tokens
omna_pii_mask.download_model() # pre-fetch the L3 model
omna_pii_mask.version() # engine fingerprint (version+gitsha)
Reversible PII is replaced with stable tokens ([PERSON_1], [EMAIL_1], …).
Secrets/credentials are always redacted irreversibly ([REDACTED:<KIND>])
and never written to the reversible token map.
Distribution
Binary-only, proprietary. Wheels are built abi3 (one wheel per platform covers
Python 3.9+). No source distribution is published — the Rust source is closed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omna_pii_mask-0.2.2-cp39-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: omna_pii_mask-0.2.2-cp39-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 9.7 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
300f47bcaa19dec73571a3a6dec18d8ce64762984fb2b01993de9b23a9c0b10a
|
|
| MD5 |
6c1d4e3158d62d5988a6c8572f207109
|
|
| BLAKE2b-256 |
5c36cdc700a28ceb683562e720b8e478c3402af5717ed2a48d9c566df27393ec
|
File details
Details for the file omna_pii_mask-0.2.2-cp39-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: omna_pii_mask-0.2.2-cp39-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 10.4 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47e69fc0ac4b439384725cbfd82d69e4a3326ded86613fd847e14c872bcdb6c8
|
|
| MD5 |
5c14f1a365120d21c93aeb47124e6f78
|
|
| BLAKE2b-256 |
20db9d349d3f53240dde7b3b48da34566370c1b75fd1ff3547b710fe9e30e5d2
|
File details
Details for the file omna_pii_mask-0.2.2-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: omna_pii_mask-0.2.2-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 8.3 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
387879fe6b0321ba5dfc4df9b263d1071c593890a834f3688fd5c4aa8c0c723b
|
|
| MD5 |
bc7dcdf6abaf7f5345078b7906854f4e
|
|
| BLAKE2b-256 |
db00e044b982ef721a2e1d596d3ac471c5f34397190c393c2bc956c5a4fc53a7
|