Skip to content

sg-pii-rules v0.1.0

Choose a tag to compare

@makoydev makoydev released this 30 Sep 16:09
· 7 commits to main since this release

Shared, tested detection rules for Singapore personal data, used by Vetted and, from Milestone 2, Discreet. All data in this repository is synthetic. Reviewed and approved by Michael Mendoza on 2026-10-01.

Detectors

Entity What it matches
NRIC NRIC and FIN numbers (S, T, F, G and M series) with a valid check letter (VALIDATORS.md: the algorithm was never officially published, and every source is graded)
NRIC_LIKE The NRIC shape with an invalid check letter: mistyped NRICs and look-alikes
PHONE Singapore numbers per the IMDA National Numbering Plan
EMAIL Practical email addresses

Evidence

  • 184 synthetic conformance cases, all passing; 245 tests.
  • Real-code behaviour, published honestly in EVALS.md: PHONE fires on bare eight-digit numeric constants in code, while every EMAIL hit was email-shaped.
  • CONTROLS.md maps each feature to PDPC's NRIC guidelines, the PDPA, OWASP, CSA, IMDA and NIST controls.

Use it

Copy detectors.json, schema/*.json, fixtures/*.json and SHA256SUMS from this tag, then verify:

shasum -a 256 -c SHA256SUMS   # or: sha256sum -c SHA256SUMS

These files are byte-identical to v0.1.0-rc.1, so projects that vendored the release candidate don't need to change anything.