What oath are you referring to?
I just checked the Net > yes, there is a security of information oath which government people at least sign, when trusted to operate in ways that they get information which is classified. There are specifications about if and when and to whom they may release that information.
When people take positions of high trust in military and law enforcement and government function, there are various oaths they take to uphold the law, defend the United States Constitution, and to protect the people of the United States of America. And included in the application of this is ones give their word they will not betray classified information to those not having a security clearance for knowing that information. We have heard politicians give an oath when . . . sworn . . . into office.
Also, for even maybe less levels of effect on others, a person getting a marriage license swears under oath, at least where I am, that he or she is not already married
And in some professions it is even illegal to give out certain information about people being served, for example in the legal and counseling and medical professions.
So, I am basing what I have said on this general information. If someone is trusted to know classified and private things of government function, it is clear they must not give out info they know to unauthorized people, and they know they have been trusted not to do this. It is illegal and there can be oaths involved, but I do not know the exact details.
But . . . information might not be protected if it is about illegal activities being covered up. So, I might need to be corrected about saying a whistleblower has betrayed classified information, if the person was letting out info about what is grounds for impeachment. But probably who gets the info legally before it is confirmed would be an issue, even so. And whoever is accused is guaranteed the right under Constitutional law to know who the accuser is and to face him or her in a court of law. So, sneaky unidentified sources might not be legal for different reasons.