Bara bin Azib reported,

The Prophet ﷺ said, "When the believer is seated in his grave, he is approached, and he testifies that there is no god but Allah and that Muhammad is the Messenger of Allah. That is the meaning of His statement, 'Allah keeps firm those who believe with the firm word' [Ibrahim 14:27]."Muhammad bin Bashshar narrated to us, Ghundar narrated to us, Shuba narrated to us this same report and added, "'Allah keeps firm those who believe' [Ibrahim 14:27] was revealed concerning the punishment of the grave."

Bukhari 1369

Sahih

حدثنا حفص بن عمر حدثنا شعبة عن علقمة بن مرثد عن سعد بن عبيدة

عن البراء بن عازب رضي الله عنهما

عن النبي ﷺ قال إذا أقعد المؤمن في قبره أتي ثم شهد أن لا إله إلا الله وأن محمدا رسول الله فذلك قوله {يثبت الله الذين آمنوا بالقول الثابت} حدثنا محمد بن بشار حدثنا غندر حدثنا شعبة بهذا وزاد {يثبت الله الذين آمنوا} نزلت في عذاب القبر

البخاري 1369صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Funerals
Chapter
Punishment of the grave
Numbering
Darussalam 1369
Bukhari 1369