This library provides various regex patters for creating risks.
BC Personal Health Numbers
[9]\d{9}|[9]\d{3} \d{3} \d{3}
Context: PHN, MSP, Personal Health Identification, CareCard, BC Services Card
BC Drivers License Numbers
\d{7}|\d\d\d\d\d\d-\d\d\d\|[Dd]\d\d\d\d\d\d\d\d\d|[A-Za-z]{2}-[A-Za-z]{2}-[A-Za-z]{2}-[A-Za-z]\d\d\d[A-Za-z]{2}|[A-Za-z]\d\d\d\d-\d\d\d\d\d-\d\d\d\d\d|[A-Za-z]{5}\d\d\d\d\d\d\d\d\d|[A-Za-z]\d\d\d\d-\d\d\d\d\d\d-\d\d
Context: Driver’s Licence, ICBC, DL,
Canadian Social Insurance Numbers(validated against the Luhn algorithm)
d{3} \d{3} \d{3}|\d{3}.\d{3}.\d{3}|\d{3}-\d{3}-\d{3}
Context: SIN, Social Insurance Number
Canadian Passport Numbers
[a-zA-Z]{2}\d{6}|[a-zA-Z]{2}\d{7}
Context: Passport No.
ITIN
(9\d{2})([ \-]?)([7]\d|8[0-8])([ \-]?)(\d{4})
Context: ITIN, Individual Taxpayer Identification Number
UK Passport
[0-9]{10}GBR[0-9]{7}[U,M,F]{1}[0-9]{9}
Context: UK Passport, UK_Passport, passport, UK
US Bank Account Number
[0-9]{4,17}
Context: bank, us bank, ACH, account
Aggressive Behavior
\b(?i)(?:((end|hang|shoot|kill|punch|kick|cut|burn|spit on|spat on|raped|rape|abused|abuse|fuck|fucked) (me|myself|her|him|you|them|it all))|(bomb|gun|knife|shank)|(bully|bullying|bullied|harass|harassment|harassed)|(stop the abuse|this is abuse|don\'t feel safe|insult|insulting|feel threatened|threaten me|threatening me))\b
IEP Info (note that context will need to be added)
\b((?i)Individualized Education Plan|Individualized Education Program)|IEP\b
Context: "Objectives,Goal,Student ID,Password,Progress Monitoring,Lesson Plans,Birthday,Learning Plans,Medicaid"
FERPA
\b(?i)(?:student transcripts and grades|degree information|class schedule|advising records|disciplinary records|athletics recruiting information|department recruiting information|wire transfer information|loan information|student tuition bills|advising records|other non-directory information|student health|educational records|student address|student id|parent financial|grade point average|final average|class roster)\b
Context: Name,Student ID,Address,DOB,Date of Birth,Parent/Guardian
Plaintext Passwords
Will match anything that is:
8-20 characters long
contains 1 or more lowercase letters
contains 1 or more uppercase letters
contains 1 or more numbers
contains 1 or more special characters
@$!%*\#?&
(?:\s|^)(?=[^\sA-Za-z]*[A-Za-z])(?=[^\s\d]*\d)(?=[^\s@$!%*\#?&]*[@$!%*\#?&])[A-Za-z\d@$!%*\#?&]{8,20}(?:\s|$)
Bitcoin Address
Description: A regex/context scan for potential scams around Bitcoin requests.
Regex: (?:^|\s)[13][a-km-zA-HJ-NP-Z1-9]{8,34}(?:$|\s|,|\.|!)
Context: The last time you visited a,installed spying software,keep your secret,You must put the two parts together,Next time you cover your cameras,all your contacts on my hard drive, website with young teenagers,ruin your life and your reputation,Bitcoin pαyʍent,Trojan horse,Blt Coin instantly,Bit-C0in,negotiable,police,bitcoin,my wallet,not negotiable,will delete