It's called the prior restraints doctrine. While the state can enjoin parties over whom it has jurisdiction against disclosure of documents (and punish them with contempt if they violate that injunction), the state cannot establish restraints on the free speech of third parties. The most famous example of this was the Pentagon Papers case in which a white paper on Vietnam was published by the usual liberal suspects after being stolen by, IIRC, a defense department contractor who was under a confidentiality agreement.
>> It’s called the prior restraints doctrine...
It seems like a small bridge to cross in order to expose something the courts have ruled sealed.