You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Presidio currently supports two Canadian entities (CA_SIN and CA_POSTAL_CODE) but not the Canadian Business Number (BN), a 9-digit business identifier issued by the Canada Revenue Agency (CRA). BNs appear in invoices, tax filings, payroll records, and B2B documents, so text containing them cannot currently be fully de-identified for Canadian business contexts.
Describe the solution you'd like
A new pattern recognizer, CaBnRecognizer, detecting the entity CA_BN:
Format: 9 digits where the last digit is a Luhn check digit (same scheme as CA_SIN). Commonly written as a 15-character program account number: the 9-digit BN + a 2-letter CRA program identifier (RT, RP, RC, RM, RR, RZ) + a 4-digit reference number, e.g. 123456782 RT 0001.
Detection: a weak pattern for the bare 9-digit form (relies on context words) and a medium pattern for the program account form, with Luhn checksum validation to eliminate false positives.
Bilingual English/French context words (business number / numéro d'entreprise, CRA / ARC, GST / TPS, etc.).
A deny-list or custom regex per deployment, but a predefined, checksum-validated recognizer benefits all users and matches how other national identifiers (AU_ABN, SG_UEN) are handled.
Additional context
I have a working implementation with unit tests ready and will open a PR referencing this issue.
Is your feature request related to a problem? Please describe.
Presidio currently supports two Canadian entities (CA_SIN and CA_POSTAL_CODE) but not the Canadian Business Number (BN), a 9-digit business identifier issued by the Canada Revenue Agency (CRA). BNs appear in invoices, tax filings, payroll records, and B2B documents, so text containing them cannot currently be fully de-identified for Canadian business contexts.
Describe the solution you'd like
A new pattern recognizer, CaBnRecognizer, detecting the entity CA_BN:
123456782 RT 0001.Reference: https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/business-registration/business-number-program-account/need-program-accounts.html
Describe alternatives you've considered
A deny-list or custom regex per deployment, but a predefined, checksum-validated recognizer benefits all users and matches how other national identifiers (AU_ABN, SG_UEN) are handled.
Additional context
I have a working implementation with unit tests ready and will open a PR referencing this issue.