@privacyscrubber/mcp-server 2.0.0 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -5
- package/index.js +19 -139
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/pii-masking-run.js +10 -28
- package/ps-pii-engine.cjs +185 -67
- package/ps-pii-engine.js +185 -67
- package/server.json +3 -3
- package/bundle.mcpb +0 -0
package/ps-pii-engine.js
CHANGED
|
@@ -17,16 +17,16 @@ let DEVOPS_SECRETS = [
|
|
|
17
17
|
// Secrets & API Keys
|
|
18
18
|
{ name: 'AWS Credentials', type: 'SECRET', regex: /\b(?:AKIA|ASIA|AGPA|AIDA|AROA|AIPA)[A-Z0-9]{16}\b/g },
|
|
19
19
|
{ name: 'JSON Web Token (JWT)', type: 'SECRET', regex: /\beyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+\b/g },
|
|
20
|
-
{ name: 'API Token/Key (GitHub/Slack/NPM)', type: 'SECRET', regex: /\b(?:ghp|gho|ghu|ghs|ghr|glpat|npm|xox[baprs])[-_][A-Za-z0-9_]{10,}\b/g },
|
|
21
|
-
{ name: 'Stripe API Key', type: 'SECRET', regex: /\b(?:[rs]k)_(?:test|live)_[a-zA-Z0-9]{
|
|
20
|
+
{ name: 'API Token/Key (GitHub/Slack/NPM)', type: 'SECRET', regex: /\b(?:ghp|gho|ghu|ghs|ghr|glpat|npm|xox[baprs])[-_][A-Za-z0-9_-]{10,}\b/g },
|
|
21
|
+
{ name: 'Stripe API Key', type: 'SECRET', regex: /\b(?:[rs]k)_(?:test|live)_[a-zA-Z0-9]{14,}\b/g },
|
|
22
22
|
{ name: 'OpenAI Project API Key', type: 'SECRET', regex: /\b(?:sk|pk)-(?:proj-)?[a-zA-Z0-9_-]{16,}\b/gi },
|
|
23
23
|
{ name: 'Database Connection URI', type: 'SECRET', regex: /\b(?:postgres(?:ql)?|mysql|mongodb(?:\+srv)?|redis|amqp|mssql):\/\/[^\s"']+/gi },
|
|
24
|
-
{ name: 'Generic Secret/Key', type: 'SECRET', regex: /\b(sk|pk|secret|key|token|auth)(?:[-_][a-zA-Z0-9_-]{3,}|(?=[a-zA-Z0-9_-]{5,}\b)(?=[a-zA-Z_-]*[0-9])[a-zA-Z0-9_-]{5,})\b/gi },
|
|
24
|
+
{ name: 'Generic Secret/Key', type: 'SECRET', regex: /\b(?:sk|pk|secret|key|token|auth)(?:[-_][a-zA-Z0-9_-]{3,}|(?=[a-zA-Z0-9_-]{5,}\b)(?=[a-zA-Z_-]*[0-9])[a-zA-Z0-9_-]{5,})\b/gi },
|
|
25
25
|
{ name: 'Hash / Hex Key (32-64 chars)', type: 'SECRET', regex: /\b[a-fA-F0-9]{32,64}\b/g },
|
|
26
26
|
{ name: 'CVE Identifier', type: 'SECRET', regex: /\bCVE-\d{4}-\d{4,}\b/gi },
|
|
27
|
-
{ name: 'Cryptographic Hash', type: 'SECRET', regex: /\b(MD5|SHA1|SHA256)[:\s][a-f0-9]{32,64}\b/gi },
|
|
28
|
-
{ name: 'Database/API Secret', type: 'SECRET', regex: /\b(DB|POSTGRES|REDIS|MYSQL|AWS|SECRET|PASSWORD|TOKEN|API
|
|
29
|
-
{ name: 'Proprietary IP / Confidential', type: 'SECRET', regex: /\b(CONFIDENTIAL|PROPRIETARY|TRADE SECRET|DO NOT DISTRIBUTE|INTERNAL USE ONLY)\b/gi },
|
|
27
|
+
{ name: 'Cryptographic Hash', type: 'SECRET', regex: /\b(?:MD5|SHA1|SHA256)[:\s][a-f0-9]{32,64}\b/gi },
|
|
28
|
+
{ name: 'Database/API Secret', type: 'SECRET', regex: /\b(?:DB|POSTGRES|REDIS|MYSQL|AWS|SECRET|PASSWORD|TOKEN|API)[A-Z0-9_]*\s*[:=]\s*[^\s"']+\b|\b(?:API_KEY|SECRET_KEY|PRIVATE_KEY|ACCESS_KEY|AUTH_KEY|ENCRYPTION_KEY)\s*[:=]\s*[^\s"']+\b/gi },
|
|
29
|
+
{ name: 'Proprietary IP / Confidential', type: 'SECRET', regex: /\b(?:CONFIDENTIAL|PROPRIETARY|TRADE SECRET|DO NOT DISTRIBUTE|INTERNAL USE ONLY)\b/gi },
|
|
30
30
|
{ name: 'Private Cryptographic Key', type: 'SECRET', regex: /-----BEGIN (?:RSA |EC |PGP |DSA )?PRIVATE KEY-----/g }
|
|
31
31
|
];
|
|
32
32
|
|
|
@@ -54,7 +54,7 @@ let REGEX_RULES = [
|
|
|
54
54
|
// Professional IDs & Organizations
|
|
55
55
|
{ type: 'NAME', isContextName: true, regex: /\b(?:[A-Z][A-Za-z0-9&.,'-]*[ \t\xA0]+){1,5}(?:Inc\.?|LLC|Corp\.?|Corporation|Ltd\.?|Limited|Co\.?|Company|Group|Holdings|Solutions|Services|Technologies|Logistics|Industries|Capital|Bank|Partners|LLP|PLLC)(?:\s+(?:LLC|Inc\.?|Corp\.?|Ltd\.?|USA|Group))?\b/g },
|
|
56
56
|
{ type: 'ID', regex: /\b(?:Employee|Emp|EE|Worker|Staff|File|Badge|Member|Advisor|Producer|Agent|Borrower)\s*(?:#|ID|No\.?|Number)[:\s#]*[A-Z0-9-]{3,15}\b/gi },
|
|
57
|
-
{ type: 'ID', regex: /\b(?:Pay\s+Group|Cost\s+Center|Dept|Department)[
|
|
57
|
+
{ type: 'ID', regex: /\b(?:Pay\s+Group|Cost\s+Center|Dept|Department)(?:[:#][\s#]*[A-Za-z0-9_-]{2,30}|\s+[A-Za-z0-9_-]*\d[A-Za-z0-9_-]*)\b/gi },
|
|
58
58
|
{ type: 'ID', regex: /(?:\b(?:Box\s+d\b|d\.\s*(?:Control|#)?|d\s+Control)\s*(?:number|no\.?|#|num)?[:\s#]*|\bControl\s*(?:number|no\.?|#|num)[:\s#]*|\bControl[:#]\s*)([A-Za-z0-9-]{3,30})/gi },
|
|
59
59
|
{ type: 'ID', regex: /\bEEID[ -]?\d{4,}\b/gi },
|
|
60
60
|
{ type: 'ID', regex: /\bRESUME[-_]?[A-Z0-9]{4,}\b/gi },
|
|
@@ -78,24 +78,34 @@ let REGEX_RULES = [
|
|
|
78
78
|
{ type: 'ID', regex: /\bTENANT[-_]ID[-_][0-9]{4,}\b/gi },
|
|
79
79
|
|
|
80
80
|
// Insurance & Health Plan IDs
|
|
81
|
-
{ type: 'ID', regex: /\b(?:BCBS|AETNA|CIGNA|UHC|HUMANA|MEDICARE|MEDICAID)[-_A-Za-z0-9]+\b/gi },
|
|
82
|
-
{ type: 'ID', regex: /\b(?:Insurance|Policy|Member|Subscriber|Group|Plan|Health|Rx
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
{ type: 'ID', regex: /\b(?:BCB|BCBS|AETNA|CIGNA|UHC|HUMANA|MEDICARE|MEDICAID)[-_A-Za-z0-9]+\b/gi },
|
|
82
|
+
{ type: 'ID', regex: /\b(?:Insurance\s+(?:ID|No\.?|Number|#)|Policy(?:\s*(?:ID|No\.?|Number|#)|[:#])|Member\s*(?:ID|No\.?|Number|#|[:#])|Subscriber\s*(?:ID|No\.?|Number|#|[:#])|Group\s*(?:ID|No\.?|Number|#|[:#])|Plan\s*(?:ID|No\.?|Number|#|[:#])|Health(?:\s+Plan)?\s*(?:ID|No\.?|Number|#)|Rx\s*(?:ID|No\.?|Number|Group|BIN|PCN|#))[:\s#]+([A-Za-z0-9-]{3,30})\b/gi },
|
|
83
|
+
{ type: 'ID', regex: /\b(?:Health\s+Plan(?:\s+Beneficiary)?|Beneficiary(?:\s+(?:No\.?|Number|ID|Num|#))?|HPN)[:\s#]+([A-Za-z0-9-]+)/gi },
|
|
84
|
+
{ type: 'ID', regex: /\bHPN[-_][A-Za-z0-9-]+\b/gi },
|
|
85
85
|
{ type: 'ADDRESS', isContextAddress: true, regex: /(?:(?:\bBox\s+f\b|\bf\.\s*|\bf\s+(?=Employee))\s*(?:Employee(?:'s)?\s*)?(?:address[,\s]+and\s+ZIP\s+code|address)?|(?:Employee(?:'s)?\s+address[,\s]+and\s+ZIP\s+code))[\s:#]*([A-Za-z0-9#.,\s-]{4,55}?)(?=\r?\n|$|\s{3,}|\t|Box|\d+\b|1\b|2\b|Wages|Federal|Social|Medicare)/gi },
|
|
86
86
|
{ type: 'ADDRESS', isContextAddress: true, regex: /(?:(?:Borrower(?:'s)?|Co-Borrower(?:'s)?|Employee(?:'s)?|Employer(?:'s)?|Home|Mailing|Property|Physical)\s+address)[\s:#]+([A-Za-z0-9#.,\s-]{4,55}?)(?=\r?\n|$|\s{3,}|\t|City|State|ZIP|SSN|EIN|Phone|Box|\d+\b)/gi },
|
|
87
|
-
{ type: 'ADDRESS', regex: /\b\d{1,6}[ \t\xA0]+(?:[A-Za-z0-9.-]+[ \t\xA0]+){
|
|
87
|
+
{ type: 'ADDRESS', regex: /\b\d{1,6}[ \t\xA0]+(?:[A-Za-z0-9.-]+[ \t\xA0]+){0,4}(?:St|Street|Ave|Avenue|Blvd|Boulevard|Rd|Road|Ln|Lane|Dr|Drive|Way|Ct|Court|Pl|Place|Terrace|Pkwy|Parkway|Sq|Square|Hwy|Highway|Cir|Circle|Trl|Trail|Loop|Row|Pike|Bishopsgate|Gate|Walk|Close|Hill|Crescent|Gardens|Grove|Mews|Yard|Box|PO Box|P\.O\.[ \t\xA0]*Box)\b(?:[ \t\xA0]*,?[ \t\xA0]*(?:Apt|Apartment|Suite|Ste|Unit|#|Fl|Floor|Bldg|Building)\.?[ \t\xA0]*[A-Za-z0-9-]+)?/gi },
|
|
88
88
|
{ type: 'ADDRESS', regex: /\b(?:P\.?O\.?[ \t\xA0]*Box|PO[ \t\xA0]*Box)[ \t\xA0]+\d{1,6}\b/gi },
|
|
89
89
|
{ type: 'ADDRESS', regex: /\b[A-Za-z][a-zA-Z\s.-]{1,25},?\s+(?:AL|AK|AZ|AR|CA|CO|CT|DE|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY|DC|PR)\s+\d{5}(?:-\d{4})?\b/g },
|
|
90
90
|
{ type: 'ADDRESS', regex: /\b(?:ZIP|Postal|Code)?\s*(?:AL|AK|AZ|AR|CA|CO|CT|DE|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY|DC|PR)\s+\d{5}(?:-\d{4})?\b/g },
|
|
91
91
|
{ type: 'ADDRESS', regex: /\b\d{5}-\d{4}\b/g },
|
|
92
|
-
|
|
92
|
+
// SSN / National IDs
|
|
93
|
+
{ type: 'ID', regex: /\b\d{3}-\d{2}-\d{4}\b/g },
|
|
94
|
+
{ type: 'ID', regex: /(?<=^|[^\w*])(?:\*{3}|X{3}|x{3}|\*{2}|X{2}|x{2})[ -]?(?:\*{2}|X{2}|x{2})\b/gi },
|
|
95
|
+
{ type: 'ID', regex: /(?<=^|[^\w*])(?:\*{3}|X{3}|x{3}|\*{2}|X{2}|x{2})[ -]?(?:\*{2}|X{2}|x{2})[ -]?\d{4}\b/g },
|
|
96
|
+
{ type: 'ID', regex: /\b\d{2}-\d{7}\b/g },
|
|
97
|
+
{ type: 'ID', regex: /\b(?:HICN|MBI)[:\s#]*([0-9][A-Za-z][0-9A-Za-z][0-9]-[A-Za-z][0-9A-Za-z][0-9]-[A-Za-z0-9]{4})\b/gi },
|
|
98
|
+
{ type: 'ID', regex: /\b[1-9][A-Za-z][0-9A-Za-z][0-9]-[A-Za-z][0-9A-Za-z][0-9]-[A-Za-z0-9]{4}\b/gi },
|
|
99
|
+
{ type: 'LOCATION', regex: /\b[A-Za-z][a-zA-Z .'-]{1,25},\s*(?:AL|AK|AZ|AR|CA|CO|CT|DE|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY|DC|PR)\b/g },
|
|
93
100
|
|
|
94
101
|
// PHI & Medical
|
|
95
|
-
{ type: 'PHI', regex: /\b(?:MRN|Patient ID|Medical Record No|Patient No)[\s:#]+([A-Za-z0-9-]+)/gi },
|
|
96
|
-
{ type: 'PHI', regex: /\bMRN[ -]
|
|
97
|
-
{ type: '
|
|
98
|
-
{ type: '
|
|
102
|
+
{ type: 'PHI', regex: /\b(?:MRN|Patient ID|Medical Record (?:No\.?|Num(?:ber)?|#)|Patient (?:No\.?|Num(?:ber)?|#))[\s:#]+([A-Za-z0-9-]+)/gi },
|
|
103
|
+
{ type: 'PHI', regex: /\bMRN[-_ ]*[A-Za-z0-9-]{4,}\b/gi },
|
|
104
|
+
{ type: 'ID', regex: /\b(?:NPI|National Provider Identifier)[:\s#]*(\d{10})\b/gi },
|
|
105
|
+
{ type: 'ID', regex: /\b(?:Device\s+(?:Identifier|ID|Serial|No\.?|Number)|UDI)[:\s#]+([A-Za-z0-9-]+)/gi },
|
|
106
|
+
{ type: 'ID', regex: /\bUDI[-_][A-Za-z0-9-]+\b/gi },
|
|
107
|
+
{ type: 'ID', regex: /\b(?:Vehicle\s+(?:Serial|ID|Identification(?:\s+Number)?|No\.?|Number)|VIN)[:\s#]+([A-Za-z0-9-]+)/gi },
|
|
108
|
+
{ type: 'PHI', regex: /\b(?!NCT|INC|SEC|ISO|DOC|SOC|CPT)[A-Z]{2,3}\d{6,8}\b/g },
|
|
99
109
|
{ type: 'PHI', regex: /\bNHS[ -]?\d{3}[ -]?\d{3}[ -]?\d{4}\b/gi },
|
|
100
110
|
|
|
101
111
|
// Copyrights
|
|
@@ -122,7 +132,7 @@ let REGEX_RULES = [
|
|
|
122
132
|
{ type: 'IP', regex: /\b(?:\d{1,3}\.){3}\d{1,3}\b/g },
|
|
123
133
|
{ type: 'IP', regex: /\b(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}\b/g },
|
|
124
134
|
{ type: 'ID', regex: /\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b/g },
|
|
125
|
-
{ type: 'ID', regex: /(
|
|
135
|
+
{ type: 'ID', regex: /(?<![:/A-Za-z0-9])(?:\/[a-zA-Z0-9_.-]+(?:[\/\\][a-zA-Z0-9_.-]+)+|\b[a-zA-Z]:\\[\w.-]+(?:\\[\w.-]+)*)/g },
|
|
126
136
|
{ type: 'ID', regex: /\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}(?::\d{2})?)?\b/g },
|
|
127
137
|
{ type: 'ID', regex: /\b\d{4}-\d{2}-\d{2}\b/g },
|
|
128
138
|
{ type: 'ID', regex: /\b\d{2}\/\d{2}\/\d{4}\b/g },
|
|
@@ -163,8 +173,8 @@ let REGEX_RULES = [
|
|
|
163
173
|
{ type: 'NAME', isContextName: true, regex: /(?:(?:Employee(?:'s)?|Borrower(?:'s)?|Co-Borrower(?:'s)?|Applicant(?:'s)?|Candidate(?:'s)?|Worker(?:'s)?|Taxpayer(?:'s)?|Spouse(?:'s)?|Person(?:'s)?)\s+)?(?:First\s+name(?:\s+(?:and|&)\s+initial)?|Given\s+name)[\s:#]+(?:\b|\b\s*)([A-Za-z0-9.\s'-]{2,30}?)(?=\r?\n|$|\s{3,}|\t|Last|Surname|Family|Suff|Box|Address|SSN|EIN)/gi },
|
|
164
174
|
// Contextual Last Names (Last name, Surname, Family name)
|
|
165
175
|
{ type: 'NAME', isContextName: true, regex: /(?:(?:Employee(?:'s)?|Borrower(?:'s)?|Co-Borrower(?:'s)?|Applicant(?:'s)?|Candidate(?:'s)?|Worker(?:'s)?|Taxpayer(?:'s)?|Spouse(?:'s)?|Person(?:'s)?)\s+)?(?:Last\s+name|Surname|Family\s+name)[\s:#]+(?:\b|\b\s*)([A-Za-z'-]{2,30})/gi },
|
|
166
|
-
// Contextual General Names (Employee,
|
|
167
|
-
{ type: 'NAME', isContextName: true, regex: /(?:Employee
|
|
176
|
+
// Contextual General Names (Employee, Principal Investigator, Physician, Doctor, etc.)
|
|
177
|
+
{ type: 'NAME', isContextName: true, regex: /(?:(?:Employee|Employer|Borrower|Co-Borrower|Applicant|Candidate|Worker|Taxpayer|Spouse|Client|Customer|Patient|Claimant|Insured|Tenant|Landlord|Buyer|Seller|Plaintiff|Defendant|Testator|Author)\s+(?:Name|Full\s+Name)|(?:Principal\s+Investigator|Investigator|Physician|Doctor|Supervisor|Reporting\s+To|Prepared\s+By|Attention|Attn|Contact(?:\s+Person)?|Author)(?:\s+Name)?|(?:Employee|Employer|Borrower|Client|Customer|Patient|Claimant|Insured|Doctor|Attn|Signatory|Witness|Tenant|Landlord|Buyer|Seller|Plaintiff|Defendant|Author)\s*[:=#])[:\s#]*(?:\b|\b\s*)([A-Z\p{Lu}][A-Za-z0-9&.,\s'-]{1,35}?)(?=\r?\n|$|\s{3,}|\t|Employee|Employer|Address|Phone|SSN|EIN|FEIN|Date|Pay|Rate|Tax|W-2|OMB|Copy|Box|Status)/giu },
|
|
168
178
|
// Box e shorthand
|
|
169
179
|
{ type: 'NAME', isContextName: true, regex: /\b(?:Box\s+e)\s*[:#-]\s*([A-Za-z0-9&.,\s'-]{2,40})/gi }
|
|
170
180
|
];
|
|
@@ -194,13 +204,19 @@ let PROFILE_RULES = {
|
|
|
194
204
|
{ type: 'FINANCIAL', regex: /\bPORTFOLIO[-_][A-Z0-9]{5,}\b/gi }
|
|
195
205
|
],
|
|
196
206
|
medical: [
|
|
197
|
-
{ type: 'PHI', regex: /\b(?:MRN|Patient ID|Medical Record No|Patient No)[\s:#]+([A-Za-z0-9-]+)/gi },
|
|
207
|
+
{ type: 'PHI', regex: /\b(?:MRN|Patient ID|Medical Record (?:No\.?|Num(?:ber)?|#)|Patient (?:No\.?|Num(?:ber)?|#))[\s:#]+([A-Za-z0-9-]+)/gi },
|
|
198
208
|
{ type: 'DATE', regex: /\b(?:DOB|Date of Birth|BIRTHDAY)[\s:]+([0-9./-]{6,10})\b/gi },
|
|
199
|
-
{ type: 'PHI', regex: /\bMRN[ -]
|
|
200
|
-
{ type: 'ID', regex: /\b(?:Insurance|Policy|Member|Subscriber|Group|Plan|Health|Rx
|
|
201
|
-
{ type: 'ID', regex: /\b(?:
|
|
202
|
-
{ type: '
|
|
203
|
-
{ type: '
|
|
209
|
+
{ type: 'PHI', regex: /\bMRN[-_ ]*[A-Za-z0-9-]{4,}\b/gi },
|
|
210
|
+
{ type: 'ID', regex: /\b(?:Insurance\s+(?:ID|No\.?|Number|#)|Policy(?:\s*(?:ID|No\.?|Number|#)|[:#])|Member\s*(?:ID|No\.?|Number|#|[:#])|Subscriber\s*(?:ID|No\.?|Number|#|[:#])|Group\s*(?:ID|No\.?|Number|#|[:#])|Plan\s*(?:ID|No\.?|Number|#|[:#])|Health(?:\s+Plan)?\s*(?:ID|No\.?|Number|#)|Rx\s*(?:ID|No\.?|Number|Group|BIN|PCN|#))[:\s#]+([A-Za-z0-9-]{3,30})\b/gi },
|
|
211
|
+
{ type: 'ID', regex: /\b(?:Health\s+Plan(?:\s+Beneficiary)?|Beneficiary(?:\s+No\.?|\s+Number)?|HPN)[:\s#]+([A-Za-z0-9-]+)/gi },
|
|
212
|
+
{ type: 'ID', regex: /\bHPN[-_][A-Za-z0-9-]+\b/gi },
|
|
213
|
+
{ type: 'ID', regex: /\b(?:BCB|BCBS|AETNA|CIGNA|UHC|HUMANA|MEDICARE|MEDICAID)[-_A-Za-z0-9]+\b/gi },
|
|
214
|
+
{ type: 'ID', regex: /\b(?:NPI|National Provider Identifier)[:\s#]*(\d{10})\b/gi },
|
|
215
|
+
{ type: 'ID', regex: /\b(?:Device\s+(?:Identifier|ID|Serial|No\.?|Number)|UDI)[:\s#]+([A-Za-z0-9-]+)/gi },
|
|
216
|
+
{ type: 'ID', regex: /\bUDI[-_][A-Za-z0-9-]+\b/gi },
|
|
217
|
+
{ type: 'ID', regex: /\b(?:Vehicle\s+(?:Serial|ID|Identification(?:\s+Number)?|No\.?|Number)|VIN)[:\s#]+([A-Za-z0-9-]+)/gi },
|
|
218
|
+
{ type: 'ID', regex: /\bVIN[-_][A-Za-z0-9-]+\b/gi },
|
|
219
|
+
{ type: 'PHI', regex: /\b(?!NCT|INC|SEC|ISO|DOC|SOC|CPT)[A-Z]{2,3}\d{6,8}\b/g },
|
|
204
220
|
{ type: 'PHI', regex: /\bNHS[ -]?\d{3}[ -]?\d{3}[ -]?\d{4}\b/gi }
|
|
205
221
|
],
|
|
206
222
|
security: [
|
|
@@ -234,13 +250,13 @@ let PROFILE_RULES = {
|
|
|
234
250
|
{ type: 'ID', regex: /\b(?:MLS|LIS)[- ]?\d{6,10}\b/gi },
|
|
235
251
|
{ type: 'ID', regex: /\bPARCEL[- ]?\d{5,15}\b/gi },
|
|
236
252
|
{ type: 'ID', regex: /\bTENANT[-_]ID[-_][0-9]{4,}\b/gi },
|
|
237
|
-
{ type: 'FINANCIAL', regex:
|
|
253
|
+
{ type: 'FINANCIAL', regex: /(?<=\b(?:RENT|LEASE|ESCROW)[\s:]+)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,]{3,}(?:\.\d{2})?\b/gi },
|
|
238
254
|
{ type: 'SECRET', regex: /\b(?:GATE|DOOR|LOBBY)[-_ ](?:CODE|PIN)[\s:]*\d{4,6}\b/gi }
|
|
239
255
|
],
|
|
240
256
|
compliance: [
|
|
241
257
|
{ type: 'SECRET', regex: /\b(?:GDPR|HIPAA|CCPA|SOC2|ISO27001)[-_: ]?AUDIT[-_: ]?\d{4}\b/gi },
|
|
242
258
|
{ type: 'SECRET', regex: /\b(?:DPA|POLICY)[-_: ]?[A-Z0-9]{5,15}\b/gi },
|
|
243
|
-
{ type: 'ID', regex: /\b(?:SAR|DSAR)[-_\/: ]
|
|
259
|
+
{ type: 'ID', regex: /\b(?:SAR|DSAR)(?:[-_\/: ]+[A-Z0-9/_-]+|[0-9][A-Z0-9/_-]*)\b/gi }
|
|
244
260
|
],
|
|
245
261
|
ccpa: [
|
|
246
262
|
{ type: 'ID', regex: /\b(?:DL|DRIVER['’]?S?\s+LICENSE)[:\s#-]*[A-Z0-9]{6,12}\b/gi },
|
|
@@ -262,7 +278,7 @@ let PROFILE_RULES = {
|
|
|
262
278
|
academic: [
|
|
263
279
|
{ type: 'ID', regex: /\b(?:STUDENT|ALUMNI)[-_:# ]?[0-9]{5,10}\b/gi },
|
|
264
280
|
{ type: 'ID', regex: /\bCOURSE[-_:# ]?[A-Z]{3,4}[ ]?[0-9]{3,4}\b/gi },
|
|
265
|
-
{ type: 'ID', regex: /\b(?:FERPA|IRB)[-_:# ]
|
|
281
|
+
{ type: 'ID', regex: /\b(?:FERPA|IRB)[-_:# ]*[A-Z0-9_-]*\d[A-Z0-9_-]*\b/gi },
|
|
266
282
|
{ type: 'ID', regex: /\bGRADE[S]?[\s:][A-DF][+-]?\b/gi }
|
|
267
283
|
],
|
|
268
284
|
creative: [
|
|
@@ -338,7 +354,7 @@ let PROFILE_RULES = {
|
|
|
338
354
|
|
|
339
355
|
// Employee, Loan & Payroll IDs
|
|
340
356
|
{ type: 'ID', regex: /\b(?:Employee|Emp|EE|Worker|Borrower|Badge|Advisor|Producer|Agent|Applicant|File)\s*(?:#|ID|No\.?|Number)[:\s#]*[A-Z0-9-]{3,20}\b/gi },
|
|
341
|
-
{ type: 'ID', regex: /\b(?:Pay\s+Group|Cost\s+Center|Dept|Department)[
|
|
357
|
+
{ type: 'ID', regex: /\b(?:Pay\s+Group|Cost\s+Center|Dept|Department)(?:[:#][\s#]*[A-Za-z0-9_-]{2,30}|\s+[A-Za-z0-9_-]*\d[A-Za-z0-9_-]*)\b/gi },
|
|
342
358
|
{ type: 'ID', regex: /\b(?:Loan|Application|Deal|Borrower|File)\s*(?:#|ID|No\.?|Number)[:\s#]*[A-Za-z0-9-]{4,25}\b/gi },
|
|
343
359
|
|
|
344
360
|
// Direct Deposit, Bank Accounts & Routing Numbers (Masked & Unmasked)
|
|
@@ -356,12 +372,12 @@ let PROFILE_RULES = {
|
|
|
356
372
|
{ type: 'ADDRESS', regex: /\b\d{1,6}[ \t\xA0]+(?:[A-Za-z0-9.-]+[ \t\xA0]+){1,4}(?:St|Street|Ave|Avenue|Blvd|Boulevard|Rd|Road|Ln|Lane|Dr|Drive|Way|Ct|Court|Pl|Place|Terrace|Pkwy|Parkway|Sq|Square|Hwy|Highway|Cir|Circle|Trl|Trail|Loop|Row|Pike|Box|PO Box|P\.O\.[ \t\xA0]*Box)\b(?:[ \t\xA0]*,?[ \t\xA0]*(?:Apt|Apartment|Suite|Ste|Unit|#|Fl|Floor|Bldg|Building)\.?[ \t\xA0]*[A-Za-z0-9-]+)?/gi },
|
|
357
373
|
{ type: 'ADDRESS', regex: /\b[A-Za-z][a-zA-Z\s.-]{1,25},?\s+(?:AL|AK|AZ|AR|CA|CO|CT|DE|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY|DC|PR)\s+\d{5}(?:-\d{4})?\b/g },
|
|
358
374
|
{ type: 'ADDRESS', regex: /\b\d{5}-\d{4}\b/g },
|
|
359
|
-
{ type: 'LOCATION', regex: /\b[A-Za-z][a-zA-Z
|
|
375
|
+
{ type: 'LOCATION', regex: /\b[A-Za-z][a-zA-Z .'-]{1,25}(?:,\s*(?:AL|AK|AZ|AR|CA|CO|CT|DE|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY|DC|PR)|\s+(?:AL|AK|AZ|AR|CA|CO|CT|DE|FL|GA|HI|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY|DC|PR))\b/g }
|
|
360
376
|
]
|
|
361
377
|
};
|
|
362
378
|
|
|
363
379
|
let NAME_STOP_LIST = new Set([
|
|
364
|
-
'clinical note', 'case note', 'prod log', 'siem alert', 'hr review', 'crm export', 'bank statement', 'file export', 'database row', 'lease application', 'strategy export', 'action log', 'glossary query', 'tool comparison', 'call transcript', 'zendesk ticket', 'board minutes', 'agent context', 'config dump', 'database dump', 'patient note', 'medical record', 'admission note', 'discharge summary', 'progress note', 'hiring review', 'security audit', 'incident response', 'server log', 'system log', 'api response', 'error log', 'audit log', 'debug log',
|
|
380
|
+
'clinical note', 'case note', 'prod log', 'siem alert', 'critical security incident', 'security incident', 'hr review', 'crm export', 'bank statement', 'file export', 'database row', 'lease application', 'strategy export', 'action log', 'glossary query', 'tool comparison', 'call transcript', 'zendesk ticket', 'board minutes', 'agent context', 'config dump', 'database dump', 'patient note', 'medical record', 'admission note', 'discharge summary', 'progress note', 'hiring review', 'security audit', 'incident response', 'server log', 'system log', 'api response', 'error log', 'audit log', 'debug log',
|
|
365
381
|
'tax statement', 'wage and tax statement', 'wage and tax', 'wage statement', 'earning statement', 'earnings statement', 'pay statement', 'pay stub', 'paystub', 'withholding statement',
|
|
366
382
|
'case no', 'account no', 'client no', 'ref no', 'matter no',
|
|
367
383
|
'affected user', 'incident date', 'incident type', 'incident report',
|
|
@@ -398,14 +414,13 @@ let NAME_STOP_LIST = new Set([
|
|
|
398
414
|
'first name', 'last name', 'middle name', 'full name', 'email address', 'phone number', 'cell phone', 'home phone', 'zip code', 'postal code', 'page number', 'section one', 'table contents', 'table of', 'figure one',
|
|
399
415
|
'marketing department', 'sales department', 'engineering team', 'product team', 'customer support', 'human resources', 'public relations',
|
|
400
416
|
'artificial intelligence', 'machine learning', 'deep learning', 'large language', 'operating system', 'source code', 'user interface', 'web browser', 'pull request', 'merge request', 'commit message', 'code review', 'cloud computing', 'database schema',
|
|
401
|
-
'blood pressure', 'heart rate', 'chief physician', 'treating physician', 'health care', 'healthcare provider', 'medical record',
|
|
417
|
+
'blood pressure', 'heart rate', 'chief physician', 'treating physician', 'health care', 'healthcare provider', 'medical record', 'medical record number', 'acute bronchitis', 'vital signs', 'vital sign', 'health plan', 'health plan beneficiary', 'device identifier', 'vehicle serial',
|
|
402
418
|
'grade a', 'grade b', 'grade c', 'grade d', 'grade f',
|
|
403
419
|
'version 1', 'version 2', 'version 3', 'version 4', 'version 5',
|
|
404
420
|
'step 1', 'step 2', 'step 3', 'step 4', 'step 5',
|
|
405
421
|
'page 1', 'page 2', 'page 3', 'page 4', 'page 5',
|
|
406
422
|
'cs101', 'course cs101',
|
|
407
|
-
|
|
408
|
-
'docket number', 'docket numbers', 'dockets section', 'case name', 'case names', 'case number', 'case numbers', 'law firm', 'law firms', 'counsel stack', 'counselstack', 'counselstack connector', 'tier 0', 'tier 1', 'tier 2', 'tier 3', 'tier 4', 'do not', 'do not write', 'specific permission', 'write again', 'without permission', 'without specific permission', 'on screen', 'in report', 'own line', 'connector access', 'prompt instruction', 'prompt instructions', 'finding report', 'findings report',
|
|
423
|
+
'docket number', 'docket numbers', 'dockets section', 'case name', 'case names', 'case number', 'case numbers', 'law firm', 'law firms', 'counsel stack', 'counselstack', 'counselstack connector', 'tier 0', 'tier 1', 'tier 2', 'tier 3', 'tier 4', 'do not', 'do not write', 'specific permission', 'write again', 'without permission', 'without specific permission', 'on screen', 'in report', 'own line', 'connector access', 'prompt instruction', 'prompt instructions', 'finding report', 'findings report', 'wage and tax statement', 'form w-2', 'wage and tax', 'tax statement', 'u.s. individual', 'income tax return', 'earnings statement', 'adp totalsource', 'paychex flex', 'clinical progress note', 'inpatient discharge summary', 'mri brain', 'closing disclosure', 'settlement statement', 'clinical protocol', 'research strategy', 'deposit in escrow', 'incident record', 'institutional review board', 'review board', 'national institutes', 'institutes health', 'dana-farber', 'cancer institute', 'harvard medical school', 'medical school', 'department homeland security', 'homeland security', 'control sc-28', 'sc-28 attestation', 'system security plan', 'morgan stanley', 'blackstone capital', 'communicating pi',
|
|
409
424
|
'white bishop', 'black bishop', 'white knight', 'black knight', 'white king', 'black king', 'white queen', 'black queen', 'white rook', 'black rook', 'white pawn', 'black pawn', 'chess piece', 'chess pieces', 'chess game', 'chess match', 'disney-pixar', 'disney pixar', 'pixar animation', 'close-up', 'close up',
|
|
410
425
|
'january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december',
|
|
411
426
|
'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday',
|
|
@@ -444,11 +459,13 @@ let NAME_STOP_LIST = new Set([
|
|
|
444
459
|
'lighting', 'keyboard', 'creating', 'building', 'training', 'planning', 'starting', 'painting', 'printing', 'returned', 'released', 'required', 'accepted', 'imported', 'services', 'products', 'accounts', 'settings', 'partners', 'keywords', 'keystone', 'keyspace', 'keynotes', 'keychain'
|
|
445
460
|
, 'quarterly results', 'strategic planning', 'market research', 'customer base', 'privacy settings', 'account settings', 'security settings', 'download now', 'free trial', 'limited time', 'copyright protected', 'all rights', 'rights reserved', 'credit score', 'monthly rent', 'lease application', 'property address', 'reference number', 'additional identifier', 'lease agreement', 'hiring review', 'candidate name', 'privacy policy', 'terms of service', 'machine learning', 'artificial intelligence', 'generative ai', 'silicon valley', 'google cloud', 'amazon web', 'data science', 'operating system', 'software engineer', 'product manager', 'project manager', 'data analyst', 'gross margin', 'revenue growth', 'source code', 'version control', 'large language model',
|
|
446
461
|
'wages', 'wage', 'tips', 'compensation', 'withheld', 'withholding', 'medicare', 'deductions', 'deduction',
|
|
447
|
-
'regular', 'hours', 'holiday', 'overtime', 'commission', 'bonus', 'bonuses', 'records', 'record', 'statement', 'statements', 'rate', 'rates', 'current', 'ytd', 'benefits', 'taxable', 'pre-tax', 'post-tax', 'reimbursements', 'reimbursement', 'fica', 'oasdi', 'disability', 'unemployment', 'sui', 'sdi', 'std', 'ltd', 'exemptions', 'exemption', 'allowances', 'allowance', 'filing', 'status', 'single', 'married', 'head', 'household', 'advice', 'frequency', 'bi-weekly', 'biweekly', 'weekly', 'monthly', 'semi-monthly', 'direct', 'deposit', 'routing', 'box', 'boxes', 'code', 'control', 'omb', 'copy', 'instructions', 'information', 'deferred', 'adoption', 'statutory', 'third-party', 'sick', 'form', 'schedule', 'w-2', 'w2', 'w-4', 'w4', '1099', 'k-1', '1040', 'fed', 'med', 'fwt', 'swt', 'fed w/h', 'fed med', 'locality', 'state wages', 'state tax', 'local wages', 'local tax', 'allocated', 'nonqualified', 'suff', 'suffix', 'allocated tips', 'advance eic', 'advance eic payment', 'dependent care', 'dependent care benefits', 'nonqualified plans', 'statutory employee', 'retirement plan', 'third-party sick pay'
|
|
462
|
+
'regular', 'hours', 'holiday', 'overtime', 'commission', 'bonus', 'bonuses', 'records', 'record', 'statement', 'statements', 'rate', 'rates', 'current', 'ytd', 'benefits', 'taxable', 'pre-tax', 'post-tax', 'reimbursements', 'reimbursement', 'fica', 'oasdi', 'disability', 'unemployment', 'sui', 'sdi', 'std', 'ltd', 'exemptions', 'exemption', 'allowances', 'allowance', 'filing', 'status', 'single', 'married', 'head', 'household', 'advice', 'frequency', 'bi-weekly', 'biweekly', 'weekly', 'monthly', 'semi-monthly', 'direct', 'deposit', 'routing', 'box', 'boxes', 'code', 'control', 'omb', 'copy', 'instructions', 'information', 'deferred', 'adoption', 'statutory', 'third-party', 'sick', 'form', 'schedule', 'w-2', 'w2', 'w-4', 'w4', '1099', 'k-1', '1040', 'fed', 'med', 'fwt', 'swt', 'fed w/h', 'fed med', 'locality', 'state wages', 'state tax', 'local wages', 'local tax', 'allocated', 'nonqualified', 'suff', 'suffix', 'allocated tips', 'advance eic', 'advance eic payment', 'dependent care', 'dependent care benefits', 'nonqualified plans', 'statutory employee', 'retirement plan', 'third-party sick pay',
|
|
463
|
+
'uk', 'eu', 'us', 'usa', 'dpa', 'ico', 'dpo', 'ciso', 'ssrn', 'elsevier', 'gdpr', 'ccpa', 'cpra', 'hipaa', 'soc2', 'iso27001', 'governance', 'regulatory', 'framework', 'mandate', 'mandates', 'guidance', 'statute', 'statutes', 'jurisdiction', 'jurisdictions', 'recital', 'article', 'articles', 'treatise', 'workstation', 'device', 'endpoint', 'blueprint', 'personal', 'cross-border', 'cross', 'border', 'transfer', 'retrieval', 'augmented', 'generation', 'limitation', 'discrimination', 'imposes', 'heavy', 'identifiable', 'bypasses', 'author', 'contact', 'keywords', 'keyword', 'keys', 'key', 'separation', 'pre-print', 'preprint']);
|
|
448
464
|
|
|
449
|
-
let JARGON_WORDS = new Set(['step', 'page', 'grade', 'version', 'course', 'class', 'follow', 'chapter', 'lesson', 'unit', 'marketing', 'manager', 'specialist', 'science', 'administration', 'university', 'skills', 'leadership', 'communication', 'working', 'proficiency', 'decision', 'driven', 'experience', 'summary', 'bachelor', 'ads', 'solutions', 'positioning', 'acquisition', 'strategy', 'research', 'database', 'forecast', 'interest', 'prepared', 'merchant', 'document', 'feedback', 'template', 'campaign', 'partners', 'settings', 'keystone', 'llm', 'gpt', 'chatgpt', 'openai', 'anthropic', 'claude', 'gemini', 'api', 'json', 'xml', 'html', 'css', 'javascript', 'python', 'golang', 'typescript', 'rust', 'fastapi', 'snowflake', 'kubernetes', 'terraform', 'docker', 'redis', 'kafka', 'pytorch', 'policy', 'terms', 'conditions', 'release', 'sprint', 'deployment', 'cluster', 'instance', 'package', 'module', 'revenue', 'margin', 'gross', 'quarter', 'system', 'code', 'data', 'cloud', 'server', 'database', 'artificial', 'intelligence', 'learning', 'generative', 'regular', 'hours', 'holiday', 'earnings', 'deductions', 'withheld', 'withholding', 'taxes', 'medicare', 'benefits', 'reimbursements', 'compensation', 'wages', 'code']);
|
|
465
|
+
let JARGON_WORDS = new Set(['step', 'page', 'grade', 'version', 'course', 'class', 'follow', 'chapter', 'lesson', 'unit', 'marketing', 'manager', 'specialist', 'science', 'administration', 'university', 'skills', 'leadership', 'communication', 'working', 'proficiency', 'decision', 'driven', 'experience', 'summary', 'bachelor', 'ads', 'solutions', 'positioning', 'acquisition', 'strategy', 'research', 'database', 'forecast', 'interest', 'prepared', 'merchant', 'document', 'feedback', 'template', 'campaign', 'partners', 'settings', 'keystone', 'llm', 'gpt', 'chatgpt', 'openai', 'anthropic', 'claude', 'gemini', 'api', 'json', 'xml', 'html', 'css', 'javascript', 'python', 'golang', 'typescript', 'rust', 'fastapi', 'snowflake', 'kubernetes', 'terraform', 'docker', 'redis', 'kafka', 'pytorch', 'policy', 'terms', 'conditions', 'release', 'sprint', 'deployment', 'cluster', 'instance', 'package', 'module', 'revenue', 'margin', 'gross', 'quarter', 'system', 'code', 'data', 'cloud', 'server', 'database', 'artificial', 'intelligence', 'learning', 'generative', 'regular', 'hours', 'holiday', 'earnings', 'deductions', 'withheld', 'withholding', 'taxes', 'medicare', 'benefits', 'reimbursements', 'compensation', 'wages', 'code', 'uk', 'eu', 'us', 'usa', 'dpa', 'ico', 'dpo', 'ciso', 'ssrn', 'elsevier', 'gdpr', 'ccpa', 'cpra', 'hipaa', 'soc2', 'iso27001', 'governance', 'regulatory', 'framework', 'mandate', 'mandates', 'guidance', 'statute', 'statutes', 'jurisdiction', 'jurisdictions', 'recital', 'article', 'articles', 'treatise', 'workstation', 'device', 'endpoint', 'blueprint', 'personal', 'cross-border', 'cross', 'border', 'transfer', 'retrieval', 'augmented', 'generation', 'limitation', 'discrimination', 'imposes', 'heavy', 'identifiable', 'bypasses', 'author', 'contact', 'keywords', 'keyword', 'keys', 'key', 'separation', 'pre-print', 'preprint']);
|
|
450
466
|
|
|
451
467
|
let NOT_NAME_WORDS = new Set([
|
|
468
|
+
'uk', 'eu', 'us', 'usa', 'dpa', 'ico', 'dpo', 'ciso', 'ssrn', 'elsevier', 'gdpr', 'ccpa', 'cpra', 'hipaa', 'soc2', 'iso27001', 'governance', 'regulatory', 'framework', 'mandate', 'mandates', 'guidance', 'statute', 'statutes', 'jurisdiction', 'jurisdictions', 'recital', 'article', 'articles', 'treatise', 'workstation', 'device', 'endpoint', 'blueprint', 'personal', 'cross-border', 'cross', 'border', 'transfer', 'retrieval', 'augmented', 'generation', 'limitation', 'discrimination', 'imposes', 'heavy', 'identifiable', 'bypasses', 'author', 'contact', 'keywords', 'keyword', 'keys', 'key', 'separation', 'pre-print', 'preprint',
|
|
452
469
|
// Grammatical & Sentence Starters
|
|
453
470
|
'the', 'a', 'an', 'this', 'that', 'these', 'those', 'my', 'your', 'his', 'her', 'their', 'our', 'its', 'it', 'he', 'she', 'they', 'we', 'i', 'you', 'who', 'whom', 'which', 'what', 'whose', 'why', 'how', 'when', 'where', 'with', 'for', 'from', 'by', 'to', 'at', 'in', 'on', 'of', 'about', 'as', 'into', 'through', 'during', 'before', 'after', 'above', 'below', 'and', 'but', 'or', 'so', 'yet', 'im', "i'm", "you're", "they're", "we're", "it's", "he's", "she's", "that's", "there's", "what's", "who's", "i've", "you've", "we've", "they've", "i'll", "you'll", "we'll", "they'll", "i'd", "you'd", "we'd", "they'd",
|
|
454
471
|
// Verbs, Auxiliaries, Commands & Imperatives
|
|
@@ -514,6 +531,17 @@ let NOT_NAME_WORDS = new Set([
|
|
|
514
531
|
'respond', 'responding', 'responded', 'responds',
|
|
515
532
|
'preserve', 'preserving', 'preserved', 'preserves',
|
|
516
533
|
'replace', 'replacing', 'replaced', 'replaces',
|
|
534
|
+
'present', 'presented', 'presenting', 'presents',
|
|
535
|
+
'admit', 'admitted', 'admitting', 'admits',
|
|
536
|
+
'complain', 'complained', 'complaining', 'complains',
|
|
537
|
+
'prescribe', 'prescribed', 'prescribing', 'prescribes',
|
|
538
|
+
'diagnose', 'diagnosed', 'diagnosing', 'diagnoses',
|
|
539
|
+
'report', 'reported', 'reporting', 'reports',
|
|
540
|
+
'state', 'stated', 'stating', 'states',
|
|
541
|
+
'undergo', 'underwent', 'undergoing', 'undergoes',
|
|
542
|
+
'experience', 'experienced', 'experiencing', 'experiences',
|
|
543
|
+
'arrive', 'arrived', 'arriving', 'arrives',
|
|
544
|
+
'order', 'ordered', 'ordering', 'orders',
|
|
517
545
|
// Adverbs, Prepositions, Conjunctions & Modifiers
|
|
518
546
|
'again', 'without', 'with', 'within', 'specific', 'specifically', 'permission', 'permissions',
|
|
519
547
|
'underneath', 'above', 'below', 'between', 'among', 'together', 'separately', 'instead',
|
|
@@ -551,8 +579,7 @@ let NOT_NAME_WORDS = new Set([
|
|
|
551
579
|
'clinical', 'note', 'notes', 'dx', 'rx', 'tx', 'hx', 'px', 'sx', 'type', 'diabetes', 'referred', 'referral', 'diagnosed', 'diagnosis', 'patient', 'insurance', 'bcbs', 'mrn', 'dob',
|
|
552
580
|
// Tax & Payroll terms
|
|
553
581
|
'wages', 'wage', 'tips', 'compensation', 'withheld', 'withholding', 'medicare', 'deductions', 'deduction', 'earning', 'earnings', 'gross', 'net', 'pay', 'payroll', 'paystub', 'taxable', 'exempt', 'allowance', 'allowances', 'regular', 'hours', 'holiday', 'overtime', 'commission', 'bonus', 'bonuses', 'records', 'record', 'statement', 'statements', 'rate', 'rates', 'current', 'ytd', 'benefits', 'taxable', 'pre-tax', 'post-tax', 'reimbursements', 'reimbursement', 'fica', 'oasdi', 'disability', 'unemployment', 'sui', 'sdi', 'std', 'ltd', 'exemptions', 'exemption', 'allowances', 'allowance', 'filing', 'status', 'single', 'married', 'head', 'household', 'advice', 'frequency', 'bi-weekly', 'biweekly', 'weekly', 'monthly', 'semi-monthly', 'direct', 'deposit', 'routing', 'box', 'boxes', 'code', 'control', 'omb', 'copy', 'instructions', 'information', 'deferred', 'adoption', 'statutory', 'third-party', 'sick', 'form', 'schedule', 'w-2', 'w2', 'w-4', 'w4', '1099', 'k-1', '1040', 'fed', 'med', 'fwt', 'swt', 'fed w/h', 'fed med', 'locality', 'state wages', 'state tax', 'local wages', 'local tax', 'allocated', 'nonqualified',
|
|
554
|
-
|
|
555
|
-
'types', 'type', 'leaked', 'leak', 'leaks', 'masked', 'mask', 'masking', 'leave', 'screen', 'screens', 'risk', 'risks', 'cluster', 'clusters', 'parameter', 'parameters', 'processing', 'process', 'processed', 'verified', 'verify', 'verification', 'playground', 'guide', 'guides', 'protection', 'protect', 'corporate', 'enterprise', 'log', 'logs', 'airplane', 'mode', 'zero', 'trust', 'top', 'data', 'live', 'scrubber', 'scrub', 'scrubbed', 'note', 'notes', 'secret', 'secrets', 'card', 'cards', 'raw', 'input', 'output', 'contains', 'contain', 'contained', 'platform', 'solutions', 'pricing', 'company', 'news', 'dashboard', 'add', 'chrome', 'sample', 'samples', 'try', 'terms', 'privacy', 'policy', 'policies', 'home', 'compliance', 'framework', 'frameworks', 'audit', 'audits', 'receipt', 'receipts', 'overview', 'explore', 'vectors', 'vector', 'standard', 'standards', 'status', 'preview', 'view', 'actions', 'action', 'button', 'buttons', 'option', 'options', 'general', 'specialized', 'custom', 'rule', 'rules', 'token', 'tokens', 'value', 'values', 'session', 'sessions', 'local', 'server', 'servers', 'cloud', 'ram', 'memory', 'offline', 'online', 'client', 'browser', 'extension', 'workspace', 'workplace', 'pan', 'phi', 'pii', 'soc', 'soc2', 'gdpr', 'hipaa', 'ccpa', 'iso27001', 'pci', 'dss', 'nist', 'chatgpt', 'claude', 'gemini', 'copilot', 'perplexity', 'deepseek', 'qwen', 'grok', 'llama', 'mistral', 'ai', 'llm', 'prompt', 'prompts', 'transmission', 'transit', 'egress', 'neutralized', 'stripped', 'isolated', 'isolation', 'unlocked', 'locked', 'unlock', 'download', 'copy', 'dismiss', 'close', 'save', 'settings', 'protect', 'reveal', 'unmask', 'restore', 'restored', 'export', 'import',
|
|
582
|
+
'incident', 'incidents', 'critical', 'production', 'impacted', 'reported', 'details', 'vulnerability', 'vulnerabilities', 'host', 'types', 'type', 'leaked', 'leak', 'leaks', 'masked', 'mask', 'masking', 'leave', 'screen', 'screens', 'risk', 'risks', 'cluster', 'clusters', 'parameter', 'parameters', 'processing', 'process', 'processed', 'verified', 'verify', 'verification', 'playground', 'guide', 'guides', 'protection', 'protect', 'corporate', 'enterprise', 'log', 'logs', 'airplane', 'mode', 'zero', 'trust', 'top', 'data', 'live', 'scrubber', 'scrub', 'scrubbed', 'note', 'notes', 'secret', 'secrets', 'card', 'cards', 'raw', 'input', 'output', 'contains', 'contain', 'contained', 'platform', 'solutions', 'pricing', 'company', 'news', 'dashboard', 'add', 'chrome', 'sample', 'samples', 'try', 'terms', 'privacy', 'policy', 'policies', 'home', 'compliance', 'framework', 'frameworks', 'audit', 'audits', 'receipt', 'receipts', 'overview', 'explore', 'vectors', 'vector', 'standard', 'standards', 'status', 'preview', 'view', 'actions', 'action', 'button', 'buttons', 'option', 'options', 'general', 'specialized', 'custom', 'rule', 'rules', 'token', 'tokens', 'value', 'values', 'session', 'sessions', 'local', 'server', 'servers', 'cloud', 'ram', 'memory', 'offline', 'online', 'client', 'browser', 'extension', 'workspace', 'workplace', 'pan', 'phi', 'pii', 'soc', 'soc2', 'gdpr', 'hipaa', 'ccpa', 'iso27001', 'pci', 'dss', 'nist', 'chatgpt', 'claude', 'gemini', 'copilot', 'perplexity', 'deepseek', 'qwen', 'grok', 'llama', 'mistral', 'ai', 'llm', 'prompt', 'prompts', 'transmission', 'transit', 'egress', 'neutralized', 'stripped', 'isolated', 'isolation', 'unlocked', 'locked', 'unlock', 'download', 'copy', 'dismiss', 'close', 'save', 'settings', 'protect', 'reveal', 'unmask', 'restore', 'restored', 'export', 'import', 'sanitization', 'sanitizer', 'sensitive', 'entities', 'entity', 'breakdown', 'metrics', 'exposure', 'high', 'low', 'medium', 'cryptographic', 'separation', 'pseudonymization', 'minimization', 'transparency', 'forensic', 'extraction', 'conduit', 'liability', 'processor', 'binding', 'bindings', 'signature', 'certified', 'certificate', 'payload', 'transmitted', 'evaluation', 'air-gapped', 'client-side', 'zero-trust', 'iso', 'ii', 'iii', 'iv', 'v', 'vi', 'vii', 'viii', 'ix', 'x', 'statutory', 'declaration', 'pass', 'passed', 'fail', 'failed', 'side', 'privacyscrubber', 'ztds', 'safe harbor', 'harbor', 'safe', 'ciso', 'united', 'states', 'district', 'court', 'northern', 'southern', 'eastern', 'western', 'division', 'in re', 'litigation', 'complaint', 'violation', 'defend', 'trade', 'secrets', 'demand', 'jury', 'trial', 'federal', 'question', 'diversity', 'citizenship', 'mutual', 'non-disclosure', 'confidentiality', 'recitals', 'standard', 'governing', 'jpmorgan', 'chase', 'bank', 'beginning', 'ending', 'balance', 'deposits', 'additions', 'withdrawals', 'electronic', 'transfers', 'subscription', 'billed', 'lifetime', 'amount', 'due', 'subtotal', 'residential', 'commercial', 'lease', 'premises', 'deposit', 'utilities', 'closing', 'disclosure', 'settlement', 'trid', 'hud-1', 'purchase', 'price', 'escrow', 'funds', 'institutional', 'review', 'board', 'irb', 'national', 'institutes', 'health', 'nih', 'research', 'strategy', 'grant', 'adenocarcinoma', 'pancreatic', 'ductal', 'dana-farber', 'cancer', 'institute', 'harvard', 'department', 'homeland', 'cisa', 'controlled', 'unclassified', 'cui', 'foia', 'responsive', 'attestation', 'fedramp', 'ssp', 'package', 'moderate', 'impact', 'sshd', 'publickey', 'cron', 'systemd', 'failed', 'accepted', 'password', 'individual', 'income', 'totalsource', 'paychex', 'flex', 'lisinopril', 'metformin', 'atorvastatin', 'serum', 'creatinine', 'egfr', 'hba1c', 'vitals', 'copd', 'obstructive', 'pulmonary', 'disease', 'chronic', 'mri', 'brain', 'contrast', 'parenchyma', 'ventricles', 'fazekas', 'systems', 'distributed', 'event-driven', 'cfa', 'blackstone', 'morgan', 'chartered', 'confidential', 'information', 'cisa', 'attestation', 'sc-28', 'sp', '800-53', 'fedramp', 'clinicaltrials', 'nct', 'protocol', 'grant', 'r01', 'pancreatic', 'adenocarcinoma', 'dana-farber', 'harvard', 'cardiology', 'diverticulitis', 'resection', 'superbill', 'hcpcs', 'icd-10', 'progress', 'name', 'names', 'partner', 'partners', 'capital', 'adp', 'tax', 'taxes', 'inpatient', 'discharge', 'clinicaltrials.gov', 'id', 'ids', 'phd', 'md', 'do', 'jd', 'mba', 'cpa', 'pi', 'in', 'at', 'on', 'of', 'to', 'by', 'or', 'as', 'if', 'an', 'is', 'it', 'be', 'we', 'us', 'up', 'so', 'no', 'do', 'go', 'he', 'me', 'my',
|
|
556
583
|
// Games, Chess, and Playing Pieces
|
|
557
584
|
'bishop', 'bishops', 'knight', 'knights', 'rook', 'rooks', 'pawn', 'pawns', 'king', 'kings', 'queen', 'queens', 'chessboard', 'checkmate', 'stalemate', 'castling', 'en passant', 'chess',
|
|
558
585
|
// Colors & Visual Descriptors
|
|
@@ -566,11 +593,77 @@ let NOT_NAME_WORDS = new Set([
|
|
|
566
593
|
'f.3d', 'f.supp', 'u.s.c.', 'v.', 'plaintiff', 'defendant', 'v', 'u.s.', 'court', 'app.', 'reporter', 'cir.']);
|
|
567
594
|
|
|
568
595
|
const PROFILE_JARGON = {
|
|
569
|
-
medical: [
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
596
|
+
medical: [
|
|
597
|
+
'sleep', 'apnea', 'symptom', 'symptoms', 'trauma', 'hypertension', 'health', 'disease', 'condition',
|
|
598
|
+
'diagnosis', 'treatment', 'medication', 'dose', 'patient', 'clinic', 'surgery', 'therapy', 'alcohol',
|
|
599
|
+
'cannabis', 'blood', 'pressure', 'heart', 'rate', 'emergency', 'contact', 'relationship', 'type',
|
|
600
|
+
'diabetes', 'cancer', 'asthma', 'copd', 'covid', 'infection', 'syndrome', 'disorder', 'chronic', 'acute',
|
|
601
|
+
'illness', 'fever', 'allergy', 'pain', 'referral', 'referred', 'prescription', 'prescribed', 'doctor',
|
|
602
|
+
'physician', 'nurse', 'hospital', 'clinical', 'note', 'notes', 'dx', 'rx', 'tx', 'hx', 'px', 'sx',
|
|
603
|
+
'insurance', 'bcbs', 'bronchitis', 'amoxicillin', 'penicillin', 'antibiotic', 'antibiotics', 'vital',
|
|
604
|
+
'vitals', 'bp', 'hr', 'bpm', 'mmhg', 'allergies', 'dosage', 'parenchyma', 'ventricles', 'fazekas',
|
|
605
|
+
'ischemia', 'lesion', 'cardiology', 'atherosclerotic', 'aortocoronary', 'bypass', 'graft', 'hyperlipidemia',
|
|
606
|
+
'diverticulitis', 'resection', 'colon', 'superbill', 'encounter', 'cpt', 'hcpcs', 'icd-10'
|
|
607
|
+
],
|
|
608
|
+
realestate: [
|
|
609
|
+
'escrow', 'tenant', 'landlord', 'lease', 'mortgage', 'appraisal', 'broker', 'property', 'zoning',
|
|
610
|
+
'parcel', 'rent', 'buyer', 'seller', 'agent', 'listing', 'residential', 'commercial', 'premises',
|
|
611
|
+
'deposit', 'utilities', 'closing', 'disclosure', 'settlement', 'trid', 'hud-1', 'purchase', 'price',
|
|
612
|
+
'funds', 'lender', 'deed', 'title', 'disbursement'
|
|
613
|
+
],
|
|
614
|
+
legal: [
|
|
615
|
+
'testator', 'notary', 'commission', 'county', 'court', 'affidavit', 'plaintiff', 'defendant',
|
|
616
|
+
'litigation', 'jurisdiction', 'agreement', 'contract', 'settlement', 'clause', 'article', 'section',
|
|
617
|
+
'matter', 'case', 'united', 'states', 'district', 'northern', 'southern', 'eastern', 'western',
|
|
618
|
+
'division', 'complaint', 'violation', 'defend', 'trade', 'secrets', 'act', 'demand', 'jury', 'trial',
|
|
619
|
+
'federal', 'question', 'diversity', 'citizenship', 'mutual', 'non-disclosure', 'confidentiality',
|
|
620
|
+
'recitals', 'whereas', 'confidential', 'information', 'care', 'term', 'exhibit', 'party', 'parties',
|
|
621
|
+
'disclosing', 'receiving', 'witnesseth', 'standard', 'indemnification', 'liability', 'governing',
|
|
622
|
+
'law', 'docket', 'deponent', 'reporter', 'appearances', 'examination', 'services', 'scope', 'work',
|
|
623
|
+
'master', 'msa'
|
|
624
|
+
],
|
|
625
|
+
academic: [
|
|
626
|
+
'institutional', 'review', 'board', 'irb', 'protocol', 'national', 'institutes', 'health', 'nih',
|
|
627
|
+
'research', 'strategy', 'grant', 'adenocarcinoma', 'pancreatic', 'ductal', 'dana-farber', 'cancer',
|
|
628
|
+
'institute', 'harvard', 'medical', 'school', 'application', 'study', 'title', 'identifier',
|
|
629
|
+
'investigator', 'principal', 'investigators', 'sponsor', 'protection', 'confidentiality', 'harbor',
|
|
630
|
+
'standards', 'clinical', 'trials', 'de-identification', 'aggregation', 'identifiers', 'aims',
|
|
631
|
+
'sequencing', 'biomarkers', 'methylation'
|
|
632
|
+
],
|
|
633
|
+
finance: [
|
|
634
|
+
'jpmorgan', 'chase', 'bank', 'beginning', 'ending', 'balance', 'deposits', 'additions', 'withdrawals',
|
|
635
|
+
'electronic', 'transfers', 'statement', 'customer', 'subscription', 'plan', 'billed', 'lifetime',
|
|
636
|
+
'amount', 'due', 'subtotal', 'sales', 'tax', 'regular', 'pay', 'bonus', 'gross', 'net', 'earnings',
|
|
637
|
+
'withholding', 'withheld', 'social', 'security', 'medicare', 'fica', 'oasdi', 'swt', 'fwt', 'direct',
|
|
638
|
+
'deposit', 'checking', 'savings', 'account', 'invoice', 'currency', 'status', 'routing', 'check',
|
|
639
|
+
'advice', 'summary', 'credit', 'debit'
|
|
640
|
+
],
|
|
641
|
+
devops: [
|
|
642
|
+
'failed', 'accepted', 'publickey', 'password', 'cron', 'systemd', 'sshd', 'authentication',
|
|
643
|
+
'connection', 'timeout', 'cluster', 'postgres', 'postgresql', 'root', 'admin', 'syslog', 'daemon',
|
|
644
|
+
'service', 'kubernetes', 'k8s', 'docker', 'container', 'pod', 'namespace', 'ingress', 'egress'
|
|
645
|
+
],
|
|
646
|
+
compliance: [
|
|
647
|
+
'department', 'homeland', 'security', 'cisa', 'controlled', 'unclassified', 'information', 'cui',
|
|
648
|
+
'foia', 'responsive', 'record', 'ciso', 'attestation', 'fedramp', 'ssp', 'package', 'moderate',
|
|
649
|
+
'impact', 'level', 'nist', 'sp', '800-53', 'sc-28', 'fips', '140-3', 'dhs', 'exemption', 'privacy',
|
|
650
|
+
'mandate', 'statutory', 'declaration'
|
|
651
|
+
],
|
|
652
|
+
support: [
|
|
653
|
+
'ticket', 'status', 'priority', 'requester', 'assignee', 'organization', 'solved', 'open', 'pending',
|
|
654
|
+
'incident', 'record', 'servicenow', 'zendesk', 'jira', 'rate', 'limit', 'quota', 'concurrency',
|
|
655
|
+
'settings', 'access', 'connection', 'pool', 'exhaustion'
|
|
656
|
+
],
|
|
657
|
+
hr: [
|
|
658
|
+
'candidate', 'employee', 'payroll', 'benefits', 'salary', 'vacation', 'supervisor', 'subordinate',
|
|
659
|
+
'performance', 'appraisal', 'interview', 'resume', 'applicant', 'engineer', 'developer', 'analyst',
|
|
660
|
+
'specialist', 'director', 'manager', 'lead', 'staff', 'senior', 'junior', 'experience', 'education',
|
|
661
|
+
'skills', 'certifications', 'summary', 'responsibilities'
|
|
662
|
+
],
|
|
663
|
+
sales: [
|
|
664
|
+
'prospect', 'opportunity', 'quota', 'pipeline', 'deal', 'revenue', 'forecast', 'lead', 'churn',
|
|
665
|
+
'client', 'customer'
|
|
666
|
+
]
|
|
574
667
|
};
|
|
575
668
|
// --- END DEFAULT RULES ---
|
|
576
669
|
|
|
@@ -610,10 +703,10 @@ const PROFILE_JARGON = {
|
|
|
610
703
|
const PROFILE_ALIAS_MAP = {
|
|
611
704
|
'general': 'general',
|
|
612
705
|
'underwriting': 'underwriting', 'lending': 'underwriting', 'mortgage': 'underwriting', 'loan': 'underwriting', 'income': 'underwriting', 'income_verification': 'underwriting', 'payroll': 'underwriting', 'w2': 'underwriting', 'paystub': 'underwriting',
|
|
613
|
-
'medical': 'medical', 'healthcare': 'medical', 'health': 'medical', 'pharma': 'pharma',
|
|
706
|
+
'medical': 'medical', 'healthcare': 'medical', 'health': 'medical', 'pharma': 'pharma', 'hipaa': 'medical',
|
|
614
707
|
'engineering': 'engineering', 'dev': 'engineering', 'devops': 'engineering', 'tech': 'tech',
|
|
615
|
-
'finance': 'finance', 'bizops': 'bizops', 'sales': 'sales', 'wealthmgmt': 'wealthmgmt', 'wealth': 'wealthmgmt', 'insurance': 'insurance', 'accounting': 'accounting',
|
|
616
|
-
'legal': 'legal', 'compliance': 'compliance', 'ccpa': 'ccpa',
|
|
708
|
+
'finance': 'finance', 'bizops': 'bizops', 'sales': 'sales', 'wealthmgmt': 'wealthmgmt', 'wealth': 'wealthmgmt', 'insurance': 'insurance', 'accounting': 'accounting', 'pci': 'finance',
|
|
709
|
+
'legal': 'legal', 'compliance': 'compliance', 'ccpa': 'ccpa', 'gdpr': 'compliance', 'soc2': 'compliance', 'iso27001': 'compliance', 'nist': 'compliance', 'dpo': 'compliance', 'grc': 'compliance',
|
|
617
710
|
'hr': 'hr', 'security': 'security', 'marketing': 'marketing', 'support': 'support',
|
|
618
711
|
'realestate': 'realestate', 'academic': 'academic', 'agents': 'agents', 'ai_agents': 'agents', 'creative': 'creative', 'personal': 'personal'
|
|
619
712
|
};
|
|
@@ -697,44 +790,64 @@ const PROFILE_JARGON = {
|
|
|
697
790
|
start = m.index + relOffset;
|
|
698
791
|
}
|
|
699
792
|
}
|
|
793
|
+
if (matchedText.trim().length < 2) continue;
|
|
700
794
|
const end = start + matchedText.length;
|
|
701
795
|
|
|
702
796
|
if (rule.type !== 'NAME' && rule.type !== 'ADDRESS') {
|
|
703
797
|
const val = matchedText.toLowerCase().trim();
|
|
704
|
-
if (NAME_STOP_LIST.has(val) || NOT_NAME_WORDS.has(val)) {
|
|
798
|
+
if (NAME_STOP_LIST.has(val) || NOT_NAME_WORDS.has(val) || currentJargon.has(val)) {
|
|
705
799
|
// Skip if generic English dictionary term matched by greedy regex (e.g. SWIFT matching SCRUBBER or CONTAINS)
|
|
706
|
-
if (rule.type === 'FINANCIAL' || rule.type === 'ID' || rule.type === 'PRIVACY' || rule.type === 'SECRET') {
|
|
800
|
+
if (rule.type === 'FINANCIAL' || rule.type === 'ID' || rule.type === 'PRIVACY' || rule.type === 'SECRET' || rule.type === 'LEGAL' || rule.type === 'PHI') {
|
|
707
801
|
continue;
|
|
708
802
|
}
|
|
709
803
|
}
|
|
710
804
|
matches.push({ start, end, value: matchedText, type: rule.type });
|
|
711
805
|
} else {
|
|
806
|
+
if (rule.type === 'NAME') {
|
|
807
|
+
matchedText = matchedText.replace(/[.,;:]+$/, '').trim();
|
|
808
|
+
}
|
|
712
809
|
let val = matchedText.toLowerCase().trim();
|
|
713
|
-
if (NAME_STOP_LIST.has(val)) continue;
|
|
810
|
+
if (!val || NAME_STOP_LIST.has(val) || currentJargon.has(val) || NOT_NAME_WORDS.has(val)) continue;
|
|
714
811
|
|
|
715
|
-
if (
|
|
812
|
+
if (rule.type === 'NAME') {
|
|
716
813
|
let words = val.split(/[ \t\xA0]+/);
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
814
|
+
if (!rule.isContextName) {
|
|
815
|
+
let origWords = matchedText.split(/[ \t\xA0]+/);
|
|
816
|
+
while (words.length > 2 && (currentJargon.has(words[0]) || (words[0].length > 1 && NOT_NAME_WORDS.has(words[0])) || (words[0].replace(/[^\p{L}]/gu, '').length > 1 && NOT_NAME_WORDS.has(words[0].replace(/[^\p{L}]/gu, ''))))) {
|
|
817
|
+
origWords.shift();
|
|
818
|
+
words.shift();
|
|
819
|
+
const nextStart = matchedText.indexOf(origWords[0]);
|
|
820
|
+
if (nextStart !== -1) {
|
|
821
|
+
start += nextStart;
|
|
822
|
+
matchedText = matchedText.substring(nextStart);
|
|
823
|
+
val = matchedText.toLowerCase().trim();
|
|
824
|
+
} else {
|
|
825
|
+
break;
|
|
826
|
+
}
|
|
728
827
|
}
|
|
729
828
|
}
|
|
730
|
-
if (
|
|
829
|
+
if (!rule.isContextName && (
|
|
830
|
+
words.some(w => {
|
|
831
|
+
const cleanW = w.replace(/[^\p{L}]/gu, '');
|
|
832
|
+
if (cleanW.length <= 1) return false;
|
|
833
|
+
return currentJargon.has(w) || NOT_NAME_WORDS.has(w) || NOT_NAME_WORDS.has(cleanW) || NAME_STOP_LIST.has(w) || NAME_STOP_LIST.has(cleanW);
|
|
834
|
+
}) ||
|
|
835
|
+
val.split(/[ \t\xA0-]+/).some(sw => {
|
|
836
|
+
const cleanSW = sw.replace(/[^\p{L}]/gu, '');
|
|
837
|
+
if (cleanSW.length <= 1) return false;
|
|
838
|
+
return currentJargon.has(sw) || NOT_NAME_WORDS.has(sw) || NOT_NAME_WORDS.has(cleanSW) || NAME_STOP_LIST.has(sw) || NAME_STOP_LIST.has(cleanSW);
|
|
839
|
+
})
|
|
840
|
+
)) continue;
|
|
841
|
+
|
|
842
|
+
if (rule.isContextName && words.length > 0 && words.every(w => {
|
|
731
843
|
const cleanW = w.replace(/[^\p{L}]/gu, '');
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
844
|
+
return !cleanW || currentJargon.has(w) || NOT_NAME_WORDS.has(w) || NOT_NAME_WORDS.has(cleanW) || NAME_STOP_LIST.has(w) || NAME_STOP_LIST.has(cleanW);
|
|
845
|
+
})) {
|
|
846
|
+
continue;
|
|
847
|
+
}
|
|
735
848
|
} else if (rule.type === 'ADDRESS') {
|
|
736
849
|
const cleanVal = val.replace(/[.,;!?]/g, ' ').trim();
|
|
737
|
-
if (NAME_STOP_LIST.has(cleanVal) || currentJargon.has(cleanVal)) continue;
|
|
850
|
+
if (NAME_STOP_LIST.has(cleanVal) || currentJargon.has(cleanVal) || NOT_NAME_WORDS.has(cleanVal)) continue;
|
|
738
851
|
}
|
|
739
852
|
|
|
740
853
|
matches.push({ start, end: start + matchedText.length, value: matchedText, type: rule.type });
|
|
@@ -744,6 +857,11 @@ const PROFILE_JARGON = {
|
|
|
744
857
|
|
|
745
858
|
if (nlpNames && nlpNames.length > 0) {
|
|
746
859
|
nlpNames.forEach(name => {
|
|
860
|
+
if (!name || typeof name !== 'string' || name.trim().length < 3) return;
|
|
861
|
+
const val = name.toLowerCase().trim();
|
|
862
|
+
if (NAME_STOP_LIST.has(val) || NOT_NAME_WORDS.has(val) || currentJargon.has(val)) return;
|
|
863
|
+
const words = val.split(/\s+/);
|
|
864
|
+
if (words.every(w => NOT_NAME_WORDS.has(w) || currentJargon.has(w) || NAME_STOP_LIST.has(w))) return;
|
|
747
865
|
const safeName = name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
748
866
|
const rx = new RegExp(`(?<=^|[^\\p{L}\\p{N}_])${safeName}(?=[^\\p{L}\\p{N}_]|$)`, 'gu');
|
|
749
867
|
let m;
|
package/server.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.moxno/privacyscrubber-mcp",
|
|
4
|
-
"description": "Zero-Trust PII & secrets sanitizer. Locally scrubs data in-memory before sending context to LLMs.",
|
|
4
|
+
"description": "Zero-Trust PII & secrets sanitizer for Cursor, Claude, and AI agents. Locally scrubs data in-memory before sending context to LLMs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/moxno/privacyscrubber-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "2.0.3",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "@privacyscrubber/mcp-server",
|
|
14
|
-
"version": "
|
|
14
|
+
"version": "2.0.3",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|
package/bundle.mcpb
DELETED
|
Binary file
|