type.inbound
and any(filter(attachments,
.file_type in $file_types_images
and .content_disposition == "inline"
),
strings.icontains(body.html.raw, .content_id)
)
and any(attachments,
.file_type == "pdf"
and regex.icontains(.file_name, 'risk assessment [a-z]{2,4}[0-9]{6,}')
)
// negate highly trusted sender domains unless they fail DMARC authentication
and not (
sender.email.domain.root_domain in $high_trust_sender_root_domains
and coalesce(headers.auth_summary.dmarc.pass, false)
)
Playground
Test against your own EMLs or sample data.