Compliancekit is an open-source compliance toolkit purpose-built for the (POPIA) South Africa's primary data protection law. It detects personally identifiable information (PII) in free-form text, maps each finding to the applicable POPIA condition, scores risk exposure, and generates actionable remediation recommendations.
ComplianceKit
POPIA-focused PII scanner and compliance toolkit for South African data patterns.
Built and maintained by LehroSolutions
---
## What is ComplianceKit?
**ComplianceKit** is an open-source compliance toolkit purpose-built for the Protection of Personal Information Act (POPIA) — South Africa's primary data protection law. It detects personally identifiable information (PII) in free-form text, maps each finding to the applicable POPIA condition, scores risk exposure, and generates actionable remediation recommendations.
The tool is designed for **Information Officers, Data Protection Officers, compliance teams, and developers** who need to audit documents, databases, or user-submitted text for PII exposure. ComplianceKit runs entirely locally — no data leaves your machine unless you explicitly configure it to.
ComplianceKit ships as three things:
1. **A Python library** — import `detect_pii` and `build_compliance_summary` directly into your own code.
2. **A CLI scanner** — pipe files or stdin through `compliancekit` for instant terminal-based PII auditing.
3. **A self-hosted web application** — a full dashboard with PII scanning, risk visualization, scan history, remediation tracking, policy management, report generation, and role-based authentication.
---
## Key Features
| Capability | Description |
|---|---|
| **SA ID Number Detection** | 13-digit South African ID numbers validated with Luhn checksum |
| **Phone Number Detection** | Local (`0XX`) and international (`+27`) formats |
| **Company Registration** | `YYYY/NNNNNN/NN` format matching |
| **Email Detection** | Standard email pattern matching |
| **Passport Numbers** | South African passport format (`A` + 8 digits) |
| **Bank Account Numbers** | 8–11 digit numbers with context-aware detection (requires keywords: *bank*, *account*, *iban*, *branch*) |
| **Tax Reference Numbers** | 10-digit numbers with context-aware detection (requires keywords: *tax*, *sars*, *tin*) |
| **POPIA …