The farm contracts are under a time lock. Let's say the code is changed maliciously; however, because of the time lock, it will not run until the lock expires. The vault can pull all tokens from the farm. This was done for example, on the last days of Monster Cash when their devs made such code changes.