Description

Detects messages impersonating the Canada Revenue Agency (CRA) in English or French that contain credential theft indicators. The rule identifies senders claiming to be CRA through display names or subject line references, uses natural language understanding to detect credential theft intent, and excludes legitimate senders with proper authentication.

References

No references.

Sublime Security
Created Jun 8th, 2026 • Last updated Jun 8th, 2026
Source
type.inbound
// sender claims to be CRA
and (
  strings.icontains(sender.display_name, 'canada revenue agency')
  or strings.icontains(sender.display_name, 'agence du revenu du canada')
  or (
    // cra display name and cra reference in subject
    regex.icontains(sender.display_name, '\bcra\b')
    and regex.icontains(subject.base,
                        '(?:T4|cra|tax|canada revenue|revenu du canada)'
    )
  )
)
// nlu cred theft
and any(ml.nlu_classifier(body.current_thread.text).intents,
        .name == "cred_theft" and .confidence != 'low'
)
and not (
  (
    // negate highly trusted sender domains
    sender.email.domain.root_domain in $high_trust_sender_root_domains
    // negate legit senders from merck
    or sender.email.domain.root_domain == "cra-arc.gc.ca"
  )
  // enforce auth
  and coalesce(headers.auth_summary.dmarc.pass, false)
)
MQL Rule Console
DocsLearning Labs

Playground

Test against your own EMLs or sample data.

Share

Post about this on your socials.

Get Started. Today.

Managed or self-managed. No MX changes.

Deploy and integrate a free Sublime instance in minutes.
Get Started