Allah says;
وَذَرُواْ ظَاهِرَ الاِثْمِ وَبَاطِنَهُ
...
Leave evil, open and secret...
Mujahid said that,
it refers to all kinds of sins committed in public and secret.
Qatadah said that,
وَذَرُواْ ظَاهِرَ الاِثْمِ وَبَاطِنَهُ
(Leave sin, open and secret...),
encompasses sins committed in public and secret, whether few or many.
In another statement, Allah said,
قُلْ إِنَّمَا حَرَّمَ رَبِّيَ الْفَوَحِشَ مَا ظَهَرَ مِنْهَا وَمَا بَطَنَ
Say: "(But) the things that my Lord has indeed forbidden are Al-Fawahish (evil sins) whether committed openly or secretly. (7:33)
This is why Allah said,
...
إِنَّ الَّذِينَ يَكْسِبُونَ الاِثْمَ سَيُجْزَوْنَ بِمَا كَانُواْ يَقْتَرِفُونَ
Verily, those who commit sin will get due recompense for that which they used to commit.
Whether the sins they committed were public or secret, Allah will compensate them for these sins.
Ibn Abi Hatim recorded that An-Nawwas bin Sam`an said,
"I asked Allah's Messenger about Al-Ithm.
He said,
الاِْثمُ مَا حَاكَ فِي صَدْرِكَ وَكَرِهْتَ أَنْ يَطَّلِعَ النَّاسُ عَلَيْه
The sin is that which you find in your heart and you dislike that people become aware of it.
ظاہری اور باطنی گناہوں کو ترک کر دو
چھوٹے بڑے پوشیدہ اور ظاہر ، ہر گناہ کو چھوڑو ۔ نہ کھلی بدکار عورتوں کے ہاں جاؤ نہ چوری چھپے بدکاریاں کرو ، کھلم کھلا ان عورتوں سے نکاح نہ کرو جو تم پر حرام کر دی گئی ہیں ، غرض ہر گناہ سے دور رہو ، کیونکہ ہر بدکاری کا برا بدلہ ہے ، حضور سے سوال ہوا کہ گناہ کسے کہتے ہیں؟ آپ نے فرمایا جو تیرے دل میں کھٹکے اور تو نہ چاہے کہ کسی کو اس کی اطلاع ہو جائے ۔