If it's run in a good sandbox, it'll be safer than most of the code you run.
Then you add in controlled interfaces/gateways to give it "just enough" power to do something interesting... and you audit the hell out of those.
Risk is something that has to be managed, because it usually can't be eliminated.