Shemiras Halashon Halachos

Hilchos Lashon Hara chapter 10, section 9

If a person is publicly known to fear no one and it is known that whatever he tells he would say before the perpetrator, and he is known to only speak the truth, he may relate the perpetrator's misdeed even before one or two people even if he did not rebuke the perpetrator beforehand due to knowing he would not accept his rebuke. People will not suspect him of being a flatterer [of the perpetrator] or a liar, but know that he is jealous for the truth and wants to help the victim. But he must fulfil all the other details of the chapter.

Hilchos Lashon Hara chapter 10, section 10

The rules above also apply if the perpetrator did a transgression between man and God, but only if one sees that he did it many times on purpose and that the sin is something everyone knows is wrong. We explained this in detail earlier (4:7).