The first category concerns a naturally discreet person whose reputation is free of scandal and from whom aggression is scarcely ever seen. Such a person should be shielded; he ought to be advised and shown where he has erred, and this kind of concealment is praiseworthy.
The second category involves a reckless, careless individual who encroaches on people’s rights and whose behavior is wicked. This person is not to be covered up; rather, the prescribed course is to inform the authorities so that they can restrain him and make him an example for others.
Concealment, then, follows the dictates of benefit: if benefit lies in keeping the matter hidden, that takes precedence; if benefit lies in exposing it, that takes precedence. If one hesitates between the two, concealing is preferable. Allah is the One who grants success.
2/241 — On the authority of Abu Hurayrah, may Allah be pleased with him, who said: I heard the Messenger of Allah, peace and blessings be upon him, say, “Every member of my ummah will be granted well-being except those who sin openly. Part of openly sinning is that a man commits an act during the night which Allah has concealed for him, then when morning comes he says, ‘O so-and-so, last night I did such-and-such,’ while he had slept under his Lord’s veil only to tear off Allah’s covering from himself in the morning.” Agreed upon.
[Explanation]
The author—may Allah have mercy on him—cites the narration of Abu Hurayrah, may Allah be pleased with him, that the Prophet, peace and blessings be upon him, said: “Every member of my ummah will be granted well-being except those who sin openly.” By “every member of the ummah,” he means