From one angle, that's a scary prospect and probably something real and worth considering. On the other hand, it's amazing that the humans at the steering wheel of cybersecurity are able to keep up at all. DARPA writes that fixing a bug once found, "can take over a year from first detection to the deployment of a solution, by which time critical systems may have already been breached."
DARPA is looking for a cybersecurity system that would be "the first generation of machines that can discover, prove, and fix software flaws in real-time, without any assistance." And while it's unlikely that Musk literally believes a Skynet-like techno-supervillain will rise from the ashes of this contest (though, who knows), he does seem to feel a duty to push the conversation on A.I. regularly, which serves an important function itself as far as the public discourse on A.I. He's previously signed an open letter warning about the potential threat of A.I. and, as Inverse notes, has referred to it as our "greatest existential threat."