Skip to content

Commit

Permalink
Update impersonation_human_resources.yml (#1006)
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Scholten <[email protected]>
  • Loading branch information
aidenmitchell and morriscode authored Nov 21, 2023
1 parent ef91b1a commit 1e9d716
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion detection-rules/impersonation_human_resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ source: |
// Negate common marketing mailers
and not regex.icontains(sender.display_name, 'HR (Events|Expert)')
and (0 < length(body.links) < 10 or length(attachments) > 0)
and (
(0 < length(body.links) < 10 or length(attachments) > 0)
// mass-mailer infra abuse results in an inflated link count due to mailer templates that include links for unsubbing, changing preferences, etc.
// loosening the link count check as a result ensures we fire even with these conditions
or (
any(body.links, strings.ilike(.display_text, "*unsubscribe*", "update your preferences", "add us to your address book"))
and 0 < length(body.links) < 15
)
)
// Request and Urgency
and any(ml.nlu_classifier(body.current_thread.text).entities, .name == "request")
and any(ml.nlu_classifier(body.current_thread.text).entities, .name == "urgency")
Expand Down

0 comments on commit 1e9d716

Please sign in to comment.