Another way is malicious code gets added to the repo, if you ever run the repo code outside the VM you get infected.