-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(classification): classify known object schema detections (#85)
* refactor: pull out shared classify functionality * refactor: clean up classify helper methods * feat: add all data classification patterns * feat: add identity regexp to db known person objects * feat: add schema classification for known objects * feat: check properties for stop words
- Loading branch information
Showing
206 changed files
with
1,102 additions
and
203 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
pkg/classification/db/data_type_classification_patterns/135_message.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"metadata": { "version": "1.0" }, | ||
"id": 135, | ||
"data_type_uuid": "8358b541-500f-4321-8ee9-89ce61e9459e", | ||
"exclude_regexp": "\\b.*error|status|id.*\\b", | ||
"exclude_types": ["boolean"], | ||
"friendly_name": "Message", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\\b.*message.*\\b", | ||
"include_types": ["string"], | ||
"match_column": false, | ||
"match_object": true, | ||
"object_type": ["known_data_object"] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
pkg/classification/db/data_type_classification_patterns/140_comment.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"metadata": { "version": "1.0" }, | ||
"id": 140, | ||
"data_type_uuid": "8358b541-500f-4321-8ee9-89ce61e9459e", | ||
"exclude_regexp": null, | ||
"exclude_types": ["boolean"], | ||
"friendly_name": "Comment", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\\b.*comment.*\\b", | ||
"include_types": ["string"], | ||
"match_column": false, | ||
"match_object": true, | ||
"object_type": ["associated", "known_data_object"] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
pkg/classification/db/data_type_classification_patterns/1_email_address.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"metadata": { "version": "1.0" }, | ||
"id": 1, | ||
"data_type_uuid": "22e24c62-82d3-4b72-827c-e261533331bd", | ||
"exclude_regexp": "\\b(.*(notification|config(uration)?|template|enabled|token|reminder|subject|body|handover|sent.by|settings?|accept|label|id|voice|type).*)\\b", | ||
"exclude_types": ["boolean", "date", "bool"], | ||
"friendly_name": "Email Address", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\b.*email.*\b", | ||
"include_types": ["object", "string"], | ||
"match_column": true, | ||
"match_object": false, | ||
"object_type": ["known", "unknown_extended"] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
pkg/classification/db/data_type_classification_patterns/4_physical_address.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"metadata": { "version": "1.0" }, | ||
"id": 4, | ||
"data_type_uuid": "5a80a938-6fb2-4d9a-9c47-8d377e036506", | ||
"exclude_regexp": "\\b(.*email|(zip.*file)|ip|domain|cart|id|mac|submit|viewed|list|dialog|voice.*)\\b", | ||
"exclude_types": ["boolean"], | ||
"friendly_name": "Physical Address", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\\b(city|street|address|region|province)|((billing|shipping).*address)|((zip\\s?postal)|(zip|postal)\\s?code)\\b", | ||
"include_types": ["string", "object"], | ||
"match_column": true, | ||
"match_object": false, | ||
"object_type": ["known", "unknown_extended"] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
pkg/classification/db/data_type_classification_patterns/59_links_clicked.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"metadata": { "version": "1.0" }, | ||
"id": 59, | ||
"data_type_uuid": "adfd29eb-8abb-41ea-bec6-9c0ffdfd9206", | ||
"exclude_regexp": null, | ||
"exclude_types": ["boolean"], | ||
"friendly_name": "Links clicked", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\\b(links?|url)\\s?clicked|clicks?\\s?tracking\\b", | ||
"include_types": ["string"], | ||
"match_column": true, | ||
"match_object": false, | ||
"object_type": ["known", "unknown_extended", "unknown"] | ||
} |
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
pkg/classification/db/data_type_classification_patterns/60_date_of_birth.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"metadata": { | ||
"version": "1.0" | ||
}, | ||
"id": 60, | ||
"data_type_uuid": "da48dfad-7322-411b-988d-5bde0d7bc659", | ||
"exclude_regexp": null, | ||
"exclude_types": ["boolean"], | ||
"friendly_name": "Date of birth", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\\b(dob|bday|date\\s?of\\s?birth)|birth\\s?(date|year|day|month)\\z", | ||
"include_types": ["string", "date"], | ||
"match_column": true, | ||
"match_object": false, | ||
"object_type": ["known", "unknown_extended"] | ||
} |
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
pkg/classification/db/data_type_classification_patterns/62_spoken_languages.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"metadata": { "version": "1.0" }, | ||
"id": 62, | ||
"data_type_uuid": "c2f07a15-6cc1-451b-b8b4-7598bc0117e8", | ||
"exclude_regexp": null, | ||
"exclude_types": ["boolean"], | ||
"friendly_name": "Spoken Languages", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\\b(spoken.*languages?|language)\\z", | ||
"include_types": ["string"], | ||
"match_column": true, | ||
"match_object": false, | ||
"object_type": ["known", "unknown_extended"] | ||
} |
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
pkg/classification/db/data_type_classification_patterns/65_race.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"metadata": { "version": "1.0" }, | ||
"id": 65, | ||
"data_type_uuid": "e4049ef1-da74-46dc-ac4e-f6b4aa0672ea", | ||
"exclude_regexp": null, | ||
"exclude_types": ["boolean"], | ||
"friendly_name": "Race", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\\b(race|racial)\\b", | ||
"include_types": ["string"], | ||
"match_column": true, | ||
"match_object": false, | ||
"object_type": ["known", "unknown_extended"] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
pkg/classification/db/data_type_classification_patterns/83_mac_address.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"metadata": { "version": "1.0" }, | ||
"id": 83, | ||
"data_type_uuid": "84eb0f89-05f7-47a3-a8fb-67cc40e603c6", | ||
"exclude_regexp": null, | ||
"exclude_types": ["boolean"], | ||
"friendly_name": "Mac address", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\\b(mac\\s?addr(ess)?)\\b", | ||
"include_types": ["string"], | ||
"match_column": true, | ||
"match_object": false, | ||
"object_type": ["known", "unknown_extended"] | ||
} |
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
pkg/classification/db/data_type_classification_patterns/85_firstname.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"metadata": { "version": "1.0" }, | ||
"id": 85, | ||
"data_type_uuid": "380c8cde-ca2e-44ed-82db-2ab1e7c255c7", | ||
"exclude_regexp": null, | ||
"exclude_types": ["boolean", "number"], | ||
"friendly_name": "Firstname", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\\b(first|middle|given)\\s?names?\\b", | ||
"include_types": ["string"], | ||
"match_column": true, | ||
"match_object": false, | ||
"object_type": ["unknown"] | ||
} |
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
pkg/classification/db/data_type_classification_patterns/87_lastname.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"metadata": { "version": "1.0" }, | ||
"id": 87, | ||
"data_type_uuid": "6574a267-e3bf-4ab5-832e-15b8863206df", | ||
"exclude_regexp": null, | ||
"exclude_types": ["boolean", "number"], | ||
"friendly_name": "Lastname", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\\b(last|sur|family)\\s?name\\b", | ||
"include_types": ["string"], | ||
"match_column": true, | ||
"match_object": false, | ||
"object_type": ["unknown"] | ||
} |
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
pkg/classification/db/data_type_classification_patterns/90_fullname.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"metadata": { "version": "1.0" }, | ||
"id": 90, | ||
"data_type_uuid": "1617291b-bc22-4267-ad5e-8054b2505958", | ||
"exclude_regexp": null, | ||
"exclude_types": ["boolean"], | ||
"friendly_name": "Fullname", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\\A(\\S?(full|cardholder|display|person|customer|client|seller|doctor|patient|player|candidate|mentor|captain|winner|author|sender|recipient)\\s?name|name|(card\\s?holder))\\b", | ||
"include_types": ["string"], | ||
"match_column": true, | ||
"match_object": false, | ||
"object_type": ["known", "unknown_extended"] | ||
} |
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
pkg/classification/db/data_type_classification_patterns/92_physical_and_mental_health.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"metadata": { "version": "1.0" }, | ||
"id": 92, | ||
"data_type_uuid": "8421f13c-0b9a-422b-9080-55b78e7c07cd", | ||
"exclude_regexp": null, | ||
"exclude_types": ["boolean"], | ||
"friendly_name": "Physical and mental health", | ||
"health_context_data_type_uuid": null, | ||
"include_regexp": "\\b(physical|mental)\\s?health\\b", | ||
"include_types": ["object", "string"], | ||
"match_column": true, | ||
"match_object": false, | ||
"object_type": ["unknown"] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
This file contains 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
Oops, something went wrong.