This is a great article on how the Pentagon is looking to fix a "Pervasive Vulnerability" in Drones.
In one phase of the program "Fisher is bankrolling research into software that can write near-flawless code on its own. The idea is to give the software synthesizer a set of instructions about what a particular program is supposed to do, and then let it come up with the best code for that purpose. Software that writes more software may sound crazy, Fisher says. But Darpa actually has some history of doing it."
"drone won’t just be protected from an outside attacker. It’ll be protected from itself."