feat: add NgBvnRecognizer (Nigerian BVN) and KeNationalIdRecognizer (Kenyan national ID)#2169
Open
kingztech2019 wants to merge 8 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Description
Adds two new country-specific PII recognizers for African identifiers currently absent from Presidio:
NgBvnRecognizer— Nigerian Bank Verification Number (NG_BVN)The BVN is an 11-digit identifier issued by the Central Bank of Nigeria (CBN) and managed by NIBSS (Nigerian Interbank Settlement System). It links every bank account held by an individual to a single biometric record. Unauthorized disclosure is a criminal offence under the CBN BVN Regulatory Framework (Circular FPR/DIR/GEN/CIR/01/009, 2014).
Design notes:
\b\d{11}\bat score 0.01 — same footprint as the existingNgNinRecognizervalidate_resultreturnsNone(notTrue) for structurally valid matches so context-boosted score is preserved rather than unconditionally promoting toMAX_SCOREbvn,bank verification number,bank verification no,nibss,bank identity numberKeNationalIdRecognizer— Kenyan National Identity Card (KE_NATIONAL_ID)The Kenyan national ID card number is a 7–8-digit sequential identifier issued by the National Registration Bureau under the Registration of Persons Act (Cap. 107). Kenya currently has no recognizers in Presidio — this is the first.
Design notes:
\b\d{7,8}\bat score 0.01 — covers 7-digit (older cards) and 8-digit (current cards)validate_resultreturnsNonefor structurally valid matchesnational id,national identity,nid,kenyan id,kenya national id,id card,national registrationBoth recognizers are registered in
default_recognizers.yamlwithenabled: false.Issue reference
N/A — new recognizer addition for uncovered African PII entities.
Checklist