Is it? Which law?

Even if it did violate a law to reveal the information, Congress has absolute immunity, from the Speech and Debate clause, for anything said on the floor.

Its already been to the Supreme Court - Gravel v. U.S.