More realistic threat scenario is that script-kiddies and actual terrorists might start using AI for building ad-hoc hacking tools cheaply, and in theory that could lead to some dangerous situations - but for now AIs are still not capable of producing the real, high-quality and working code without the expert guidance.