@@ -14,7 +14,7 @@ source: |
1414 )
1515 or strings.icontains(subject.base, "bonus")
1616 or (
17- regex.icontains(subject.base, '\bcomp (?:ensation)?\b ')
17+ regex.icontains(subject.base, '(?:\bcomp\b|compensation) ')
1818 and not strings.icontains(subject.base, "broker")
1919 )
2020 or strings.icontains(subject.base, "earnings")
@@ -32,6 +32,7 @@ source: |
3232 )
3333 and (
3434 strings.icontains(subject.base, "access your")
35+ or strings.icontains(subject.base, "acknowledg")
3536 or regex.icontains(subject.base, 'adjust(?:ed|ment)')
3637 or regex.icontains(subject.base, 'amend(?:ed|ment)')
3738 or strings.icontains(subject.base, "appraisal")
@@ -63,20 +64,34 @@ source: |
6364 '(January|February|March|April|May|June|July|August|September|October|November|December)\s20[2,3]{1}\d{1}'
6465 )
6566 )
67+ // general strings negations
68+ and not (
69+ strings.icontains(subject.base, "error")
70+ or regex.icontains(subject.base, '\bapp(?:lication)?\b')
71+ )
6672 )
6773
6874 // the attachment contains pay related keywords
6975 and 0 < length(attachments) <= 3
7076 and any(attachments,
71- .file_type in ("doc", "docx", "pdf", "pptx")
77+ (
78+ // typical observed extentions
79+ .file_extension in ("doc", "docx", "docm", "pdf", "pptx")
80+ // missing extensions
81+ or .file_extension is null
82+ // magic bytes
83+ or .file_type in ("doc", "docx", "pdf", "pptx")
84+ // attached EML
85+ or (.content_type == "message/rfc822" or .file_extension =~ "eml")
86+ )
7287 and (
7388 (
7489 strings.icontains(.file_name, "benefits")
7590 and not strings.icontains(.file_name, "fidelity netbenefits")
7691 )
7792 or strings.icontains(.file_name, "bonus")
7893 or (
79- regex.icontains(.file_name, '\bcomp (?:ensation)?\b ')
94+ regex.icontains(.file_name, '(?:\bcomp\b|compensation) ')
8095 and not (strings.icontains(.file_name, "broker"))
8196 )
8297 or regex.icontains(.file_name, 'empl[o0]y(?:ment|ee)')
@@ -93,6 +108,7 @@ source: |
93108 )
94109 and (
95110 strings.icontains(.file_name, "access your")
111+ or strings.icontains(.file_name, "acknowledg")
96112 or regex.icontains(.file_name, 'adjust(?:ed|ment)')
97113 or regex.icontains(.file_name, 'amend(?:ed|ment)')
98114 or strings.icontains(.file_name, "appraisal")
@@ -138,8 +154,17 @@ source: |
138154 )
139155 )
140156
157+ // topic negations
158+ and not any(ml.nlu_classifier(body.current_thread.text).topics,
159+ .name == "Newsletters and Digests"
160+ )
161+
141162 // negate legitimate conversations
142- and not (subject.is_forward or subject.is_reply)
163+ and not (
164+ (length(headers.references) > 0 or headers.in_reply_to is not null)
165+ and (subject.is_forward or subject.is_reply)
166+ and length(body.previous_threads) >= 1
167+ )
143168
144169 // negate high trust sender domains unless they fail authentication
145170 and not (
@@ -160,4 +185,4 @@ detection_methods:
160185id : " 1fec6756-a98a-5777-b7e4-ffa803a906a9"
161186og_id : " a8bf1fd1-d9fa-572d-8957-51d6025a5248"
162187testing_pr : 4369
163- testing_sha : f2bf594f1df53f0ea6aae79fb1b00d60aaaea702
188+ testing_sha : 8a88b7722751d94866b5a13c2d6c1dcd81012f79
0 commit comments