Skip to content

Checking current thread text mentions follow up #2808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
15 changes: 13 additions & 2 deletions detection-rules/spam_attendee_list_solicitation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ source: |
any([subject.subject, body.current_thread.text],
(
regex.icontains(.,
'(?:Attendee|Buyer|Contact|Decision Maker|Email|Member|Participant|Professional|Registrant|User|Visitor|Store|Grocer)(?:[[:punct:]]*s)?(?:\s\w*){0,9}(?:list(?:\b|[^ei])|database)'
'(?:Attendee|Buyer|Contact|Client|Decision Maker|Email|Member|Participant|Professional|Registrant|User|Visitor|Store|Grocer)(?:[[:punct:]]*s)?(?:\s\w*){0,9}(?:list(?:\b|[^ei])|database|Information)'
)
and not (
regex.icount(.,
Expand All @@ -37,7 +37,7 @@ source: |
"(?:interest(s|ed)|accessing|purchas|obtain|acuir|sample|provide.{0,10}samples|counts|pricing)"
)
and not regex.icontains(body.current_thread.text,
"(?:debit card|transaction.{0,20}processed|receipt)"
"(?:debit card|transaction.{0,20}processed|receipt?)"
)
)
// if there are indicators of a previous thread, also inspect the previous thread
Expand All @@ -59,6 +59,10 @@ source: |
// "the email I sent you earlier"
'(e?mail|message).{0,20}(sent).{0,20}(?:below|previous(ly)?|last|prior|earlier)'
),
regex.icontains(body.current_thread.text,
// "below email"
'(?:below) (e?mail|message|request)'
),
regex.icontains(body.current_thread.text,
'(sent).{0,50}(e?mail|message) (?:below|previous(ly)?|last|prior|earlier)'
),
Expand Down Expand Up @@ -90,6 +94,13 @@ source: |
"> wrote:"
)
)
// If there is no display_name we still check for <email> wrote:
or strings.icontains(.,
strings.concat(" <",
sender.email.email,
"> wrote:"
)
)
)
// match _after_ the previous thread indciators
and (
Expand Down
Loading