Abu Hurairah reported,

I heard the Messenger of Allah ﷺ say, "All of my nation will be pardoned except those who flaunt their sins. Among such flaunting is that a man commits a deed 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 casting off the covering Allah had placed over him."

Bukhari 6069

Sahih

حدثنا عبد العزيز بن عبد الله حدثنا إبراهيم بن سعد عن ابن أخي ابن شهاب عن ابن شهاب عن سالم بن عبد الله قال سمعت

أبا هريرة يقول

سمعت رسول الله ﷺ يقول كل أمتي معافى إلا المجاهرين وإن من المجاهرة أن يعمل الرجل بالليل عملا ثم يصبح وقد ستره الله عليه فيقول يا فلان عملت البارحة كذا وكذا وقد بات يستره ربه ويصبح يكشف ستر الله عنه

البخاري 6069صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Manners
Chapter
Concealment of a believer over himself
Numbering
Darussalam 6069
Bukhari 6069