It is indeed illegal to directly divulge secret/non-publicized information in the USA. The offense ramps with the level of the privileged information.
See: E. Snowden & J. Assange, whom require presidential pardons. It's considered worse than 187 in most cases.
This is why Q has to make us link things together, so they're not legally liable.