Hilchos Lashon Hara chapter 8, section 5 6

Lashon hara only applies when spoken against someone with you (amitecha), that is, someone who is with you in Torah observance. But if one knows a person is a heretic it is a mitzvah to disparage and shame him in his presence or otherwise regarding whatever one sees him do or hears about him. For the verse says, A man shall not distress the one with him, Do not go like as talebearer against the one with you. As the verse says, Do I not hate those who hate You, O L-rd, and I quarrel with those who rise against You (Psalms 139:21). A heretic is someone who denies the Torah and Jewish prophecy. This applies to both the written and oral Torahs. This includes even someone who says: The whole Torah is from heaven except one verse, or one kal vachomer, or one gezerah shavah, or one derivation.
6. This only applies if one heard the heresy from him. If others told him, he may not rely on them and disparage him whether in front of them or otherwise. Also, the prohibition against believing lashon hara forbids one from believing the story as above in chapter 6. He should only suspect it may be true to protect himself, and privately warn others not to have contact with the person until the matter is clarified. This only applies if one merely heard someone. But if people are assumed (muchzakim) to be heretics in the town, it is as if one knows of this personally.