Two CRS reports on the topic:
Criminal Prohibitions on Leaks and Other Disclosures of Classified Defense Information (R41404, Mar. 7, 2017):
Recent unauthorized disclosures of information concerning activities in the White House, and the publication of large quantities of classified information by WikiLeaks and other organizations and news outlets, have prompted congressional interest in criminal prohibitions on disclosure of classified information. While some have described recent leaks of classified information as “illegal” and “criminal,” there is no single statute that criminalizes any unauthorized disclosure of classified information. Instead, the legal framework is based on a complex and often overlapping set of statutes with provisions that differ depending on, among other factors, what information was disclosed, to whom it was given, and the intentions of the discloser. This report identifies statutory prohibitions that may be implicated by the unauthorized release of classified information, and it examines the elements necessary to secure a conviction under the Espionage Act and applicable statutes.
The Law and Leaks to the Press (LSB, Feb. 22, 2017):
President Trump has expressed concern over leaks to the press from within the Executive Branch. Earlier administrations, particularly the Obama Administration, acted upon similar concerns to prosecute officials, employees, and contractors who leaked classified information or certain military information to the press. Officers and employees may also be subject to disciplinary action for leaks regardless of the nature of the information. However, they may claim some relief from disciplinary action under the whistleblower protection provisions. Few, if any, journalists have been prosecuted to date, but they may end up in jail for refusing to divulge their sources to a grand jury investigating a leak.