There are treaties and international conventions, as well as the ICC and other supranational bodies that prosecute abuses by nation states and individuals responsible for the actions.
But, largely, that was my point - it's entirely illegal, and a "might makes right" situation.