Rabbi Gil Student writes:
The Gemara in Mo'ed Katan (17a) states that when a Torah scholar sins, the court should not punish him in public because that would serve as a denigration of Torah. Rather, they should "hide it like the night" and punish him in private.
Rabbi Student goes on to explain the tension in halakha about how to interpret this. All I will say is that, if the longstanding behavior of haredi leadership is any indication, there is little punishment and a lot of "hiding like the night."