You can implement malware check in many ways. This one is the worst; it also introduces a huge attack surface.