Particularly at that time, there were no international courts that I know of who would have anything to say about a secret pact between two belligerents in the second world war.
The contract was to be enforced by the militaries of these belligerents, and to be interpreted and settled privately.