No, that's one aspect of protection. Penalties apply otherwise see the Waymo/Uber case.
Apparently the US statutes of relevance are:
The Economic Espionage Act of 1996
The Defend Trade Secrets Act of 2016
Re publication I think you're referring to a possible US constitutional issue: https://www.dmlp.org/legal-guide/publishing-trade-secrets