I heard the Messenger of Allah ﷺ say, "All of my nation will be forgiven except those who flaunt their sins. Part of flaunting sin is that a man commits an act by night, and when morning comes, though Allah has concealed it for him, he says, 'So-and-so, last night I did such and such.' He spent the night with his Lord covering him, and he wakes up tearing away the covering Allah had placed over him."
سمعت رسول الله ﷺ يقول: كل أمتي معافى إلا المجاهرين، وإن من المجاهرة أن يعمل الرجل بالليل عملا، ثم يصبح وقد ستره الله عليه، فيقول: يا فلان، عملت البارحة كذا وكذا، وقد بات يستره ربه، ويصبح يكشف ستر الله عنه.
Bukhari related it in al-Adab (6069), and Muslim in al-Zuhd (2990), both through the path of Ibn Shihab's nephew, from Ibn Shihab, from Salim bin Abdullah, who said, "I heard Abu Hurairah say," and then he mentioned it, and the wording is Bukhari's.