Not outside of the military except in the case of classified documents or the identities of covert agents. It's not even illegal for non-government employees to publish classified documents, as far as I know.
> Not outside of the military except in the case of classified documents or the identities of covert agents
I'm pretty sure that's wrong. I clearly remember the Bush administration restricting government scientists (and other employees) from talking to the media, requiring all communications to be approved by political appointees in their departments.
The scientists do have freedom of speech like other Americans, if that's what you mean, but that freedom doesn't protect your job; you can be fired for what you say, just not imprisoned or forced not to say it. It also doesn't protect you if you disclose your employers secrets that are protected by NDAs and similar agreements. For example (and speaking very generally), if a former Apple employee revealed details of some secret Apple tech protected by NDA, I'm almost certain the employee could be sued for damages.
And then there's the Hatch Act (1939), which prevents most federal employees from engaging in activity that could be seen as political.