type.inbound
and any(filter(attachments, .file_type == "pdf"),
any(file.explode(.),
.depth == 0
and any(.scan.yara.matches,
.name in ("pdf_jsfck_strings", "pdf_jsfck_ratio")
)
)
)
Playground
Test against your own EMLs or sample data.