The Prophet (SAWA) said, ‘If a servant [of Allah] was to secretly sin, he would only harm himself, and if he was to commit it openly and not change, people would be harmed by it.
رسولُ اللهِ (صَلَّيَ اللهُ عَلَيهِ وَ آلِهِ): إنّ المَعصيَةَ إذا عَمِلَ بها العَبدُ سِرّاً لم تَضُرَّ إلّا عامِلَها، وإذا عَمِلَ بها عَلانِيَةً ولم يُغَيَّرْ علَيهِ أضَرَّت بالعامَّةِ.
Similar narrations
Thawāb al-Aʿmāl wa ʿiqāb al-Aʿmāl #10252. Imam Ja’far Sadiq (a.s.) narrates from his ancestors that the Holy Prophet (s.a.w.s.) said, “One who is committing sins ...