AFTER EDIT: To clarify this point a bit, the world of espionage practice distinguishes "operatives" (nationals-employees of the foreign government, who first of all need a visa status even to be in the host country) from "agents" (nationals of the host country, who often have employment status in some sensitive position in the host country's government or armed forces). Yes, the United States and absolutely every country is harsh in its treatment of its own citizens who act as espionage agents directed by the intelligence operatives of foreign countries. Quite a few of the prisoners in the federal SuperMax prison in Colorado are people like John Walker or Robert Hanssen who were paid by the United States taxpayers to handle secret information with discretion and who were pledged by their terms of employment to not have contacts with foreign intelligence operatives at those operatives' direction. Men like that do hard prison time in any country where their activities are discovered. But the foreign operative usually just ends up expelled from the host country, unless there was something illegal in itself about the foreign operative's presence in the host country.
"The US government has signed agreements with the UN that it will not engage in such conduct against the UN--let alone its Secretary General."
A nation that doesn't spy on others is irrational and suicidal. Your enemy will not reciprocate your naivete. They will exploit it and enslave you.
A nation that doesn't punish spies (or their masters) caught within its territories is similarly irrational. The fear of death (or imprisonment) makes your enemy cautious and less effective.
The only morality in the international system is the morality of your own victory and what you do with it. In victory, you can spread peace, freedom, and prosperity to your heart's content. In defeat, your ideals are worthless.
Probably you are thinking of the "survival of the fittest", but that doesn't mean only survival of the fittest country, it also means survival of the fittest alliance of countries. In that sense, cooperation and reciprocal help leads to increased chance of success for a country.
When applying to humans, "the law of the jungle" is just half the story. People who are in groups that cooperate well are more likely to survive, too. Humans are social animals, we cooperate to get things done. Just being the fittest one single man does not necessarily make you more successful.
A better model for survival is ecology, which puts a big emphasis on the complex interdependency of species and individuals.
Or, to make an analogy: even if a cancer cell is the most fit to reproduce in the body, it will soon lead to the demise of its own organism and, as a consequence, live shorter than a regular cooperating cell.