There is no world government as the UN is surely not that to be able to judge if the US actions was or was not legal.
Declaring that the US actions illegal or not is completely meaningless in a legal content.
We have so call war crimes trials at the end of WW2 but they was just the victors putting a PR face on what they was going to do in any case.
In my opinion, we should had just done what the Russians wished to do and placed then again a wall and shoots them.
Maybe someday we will have a real world government with a real legal system and real courts and so on but such does not exist as of now.
Stating that a nation actions in illegal until then is completely meaningless.