I'm aware this practice has been going on for decades, people leaking private and/or classified information, often illegally. But it's like money laundering, just "info" laundering through an "unnamed source," and it feels pretty sleazy.
When leaked classified documents show something highly troubling, like the Snowden leaks or Wikileaks, the government doubles down and does everything it can to punish those leakers to the maximum extent, which is not what a "healthy system" would do to a whistleblower exposing illegal or corrupt activity.
[0] https://en.m.wikipedia.org/wiki/New_York_Times_Co._v._United...
A government official privy to classified information is subject to secrecy rules that supersede the 1st. The question at issue is whether a journalist who becomes privy to the the same classified information is subject to the same rules. "The question before the court was whether the constitutional freedom of the press, guaranteed by the First Amendment, was subordinate to a claimed need of the executive branch of government to maintain the secrecy of information." i.e. which takes priority, the 1st, or rules about secrecy (the Espionage Act, in this case).
From your wikipedia article: "New York Times v. United States ... did not void the Espionage Act or give the press unlimited freedom to publish classified documents." The Court did not say that journalists have free reign, they simply refused to grant an injunction against publication. While this, and subsequent cases, certainly signal wide breadth of press freedom, it's not absolute and not a guarantee against a future prosecution.
https://www.npr.org/sections/thetwo-way/2017/03/22/521009791...
FBI Director James Comey demurred. "That's a harder question, as to whether a reporter incurs criminal liability by publishing classified information," Comey said.
freedom of the press is not absolute, even in the U.S. According to a recent paper from the Congressional Research Service, the question is far from settled
The justices didn't block the government from exercising what's called "prior restraint" — that is, preventing a news organization from publishing or broadcasting news.
The 1st amendment still protects the reporter. They are legally in the clear. The person who told them is not.