None, until you equip the dog with an AI that decides on its own when to kill people. I am pretty sure this is what the OP meant.
[1] https://www.theverge.com/2017/7/7/15933554/george-hotz-hacki...
People are hacking on everything from micro-drones to full sized cars. Why single out this platform? Explosive on drones or automated weapons on cars could all be misused.
But to answer you questions about the legality all this - I don't know. Tesla and Uber are putting autopilots in their cars. Is that legal? Apparently, it is. Yet, those autopilots are already killing people. So expect a regulatory backlash, once enough people die.
I hope it won't take a massacre perpetrated by a buggy AI with a gun to get us there.