Generally speaking, whistleblowers act in the best interests of a populace, making their actions rather heroic.
The basis of this concept is one parents must teach to children who don't want to "tattle" on others. While no parent wants to hear every insignificant grievance throughout the day, there are times when adults expect children to report information. Reporting information to adults is particularly important if children discover that someone's actions could inflict harm on themselves or others.
This same premise is the central concept of whistleblowing. According to Cornell Law School, a whistleblower is an employee "who alleges wrongdoing by his or her employer that violates public law or tends to injure a considerable number of people."
If someone is aware of circumstances or events that present a credible danger to "a considerable number of people," that arguably constitutes a circumstance when a person should share those concerns. In most situations, this individual faces considerable backlash from the company or institution whose wrongdoings are made public; these companies usually have considerably more money and influence to sway public opinion and to secure legal counsel, as well.
While some whistleblowers have their own agendas, most often, these are people who want to offer protection and insight regarding unethical and unsafe situations. Therefore, their actions could be more accurately labeled heroic than traitorous.