Question about protection of informants

I’m re-watching the West Wing series and in episode 8 of season one, president Bartlett is a bit mean towards the vice president. A journalist finds out and the press secretary tries to handle it while also trying to figure out who leaked it.Here (in Sweden) that would be illegal.

In the show, the press secretary is trying to get the journalist to tell her who leaked the information. Then wants to fire the guilty when she finds out. Here under those circumstances you’re not allowed to even try to find out the source, nor to fire the person leaking it. How does the laws regarding whistle blowing or leaking work in the US? Would the press secretary be committing a crime?

There are various Whistleblower laws in the US but AFIAK they would not protect anyone invovled in the OP.

They might if the leaker in question has leaked some information about mismanagement in some government dept or other they may have some protection, but there is no blanket protection for leakers (and in some cases quite the opposite).

Journalists are protected from revealing their sources by shield laws. However, there is no such thing as a federal shield law. And only 36 individual states have them. In addition, they protect journalists only so far as they cannot be compelled by law to reveal sources. They can be individually pressured to do so. In the real world, everybody would put the pressure on and can do so quite legally. Journalists have to be willing to go to jail to really protect a source. It’s the weird dark side of the First Amendment. Openness is assumed, even for secrets.

That is good information. The thing that made me start wondering about this was mainly the fact that the press secretary even tried to GET the identity of the anonymous informant. That act itself is illegal here. You can not even ask who it is.