I don't see how star fleet allowed Data to remain onboard after that one. Being in the tech industry I often feel the Federation's infosec is lacking in often trivial ways (unless the episode calls for better security of course 🙂), but maybe they have just accepted that sort of thing as the cost of doing space business since it happens all the time. So Data's benefits out weigh his risk.