I believe that SCOTUS ruled differently in the Pentagon Papers case [New York Times Co. v. United States]. Perhaps there is room for interpretation - I am not a legal beagle.
I know they did. It’s why Assange should be safe from prosecution. That SC decision needs to be revisited. There is a tension between the desire to have a way for whistleblowers to get info to the public that WE think should be released, and for the government to protect confidential information that needs to be secret to protect the nation.
One distinction between Pentagon Papers and the current situation is that the media are currently active participants in the obtaining of state secrets. They are soliciting the information, and the persons inside government are not serving the needs of the public but seeking partisan advantage by leaking information that harms the national interest. They are leaking information that can cause death, loss of millions or billions of dollars by the taxpayers, and impact elections wrongfully. That conduct should not be shielded by the First Amendment.
One more SC justice and maybe it won’t be.