type.inbound
and any(filter(attachments, .file_type == "gz"),
any(file.explode(.),
any(.flavors.yara, . == "html_file")
and strings.icontains(.scan.strings.raw, "data:image")
and any(html.xpath(strings.parse_html(.scan.strings.raw),
'//a[.//span[contains(@style,"border-radius")]]/@href'
).nodes,
strings.parse_url(.raw).domain.valid
)
)
)
Playground
Test against your own EMLs or sample data.