In a scenario that sounds like science fiction but reflects a very real security blind spot, a rogue AI agent ...
Keep your host free from lingering services and mismatched versions. Run your dev stack in isolation and rebuild it when needed.