It's just that the operations in question will invoke "National Security" and "sovereign immunity" arguments sufficient to ensure the judiciary will either summary judgement the case. Or leave it conspicuously unreviewed.
Or, at the end of the day, a Presidential pardon will be conferred at the appropriate/most convenient opportunity.
Or actions will just be undertaken with the understanding that the participants will be operating deniably, in which case it is quite literally the Government unilaterally deciding that breaking the law is the only way.
So, I do get what you're saying. If it were federal employees directly participating they can be prosecuted in the US.But if this is done through a web of contractors it will be hard to prosecute.
You can, on common example is Sex crimes, a US Citizen can (and have been) charged with violations of various sex crime laws for actives that occurred outside the US in courts INSIDE the US, even if the activity was not a crime in the nation the activity took place in. aka "Sex Tourism" [1]
You can also be tried for Foreign crimes such as bribery in the US if you were bribing a Foreign official this applies to business as well as government.
[1] https://www.ice.gov/news/releases/ice-homeland-security-inve...
Yes.[1][2]
As far as the US is concerned, the Constitution is the supreme authority to which Americans can and will answer to and is protected by.
[1]: https://en.wikipedia.org/wiki/American_Service-Members%27_Pr...
[2]: https://en.wikipedia.org/wiki/International_Criminal_Court#U...
[2]: "[Bolton] added that the U.S. would do everything 'to protect our citizens' should the ICC attempt to prosecute U.S. servicemen ..."
In short, it is illegal for the NSA (or any part of the US government) to spy on Americans and legal to spy on foreigners, regardless of a given individual's location.
We generally draw the line using physical location because keeping track of whether you ended up with info on an American while spying somewhere outside America, say France or Japan, is utterly impractical. That doesn't mean the legal lines are drawn like that, though.