Sahih al-Bukhari, Hadith 7213 ⓘ
Narrated 'Ubada bin As-Samit: Allah's Messenger said to us while we were in a gathering, "Give me the oath (Pledge of allegiance for: (1) Not to join anything in worship along with Allah, (2) Not to steal, (3) Not to commit illegal sexual intercourse, (4) Not to kill your children, (5) Not to accuse an innocent person (to spread such an accusation among people), (6) Not to be disobedient (when ordered) to do good deeds. The Prophet added: Whoever amongst you fulfill his pledge, his reward will be with Allah, and whoever commits any of those sins and receives the legal punishment in this world for that sin, then that punishment will be an expiation for that sin, and whoever commits any of those sins and Allah does not expose him, then it is up to Allah if He wishes He will punish him or if He wishes, He will forgive him." So we gave the Pledge for that. (See Hadith No. 17, Vol. 1)
حَدَّثَنَا أَبُو الْيَمَانِ، أَخْبَرَنَا شُعَيْبٌ، عَنِ الزُّهْرِيِّ، وَقَالَ اللَّيْثُ، حَدَّثَنِي يُونُسُ، عَنِ ابْنِ شِهَابٍ، أَخْبَرَنِي أَبُو إِدْرِيسَ الْخَوْلاَنِيُّ، أَنَّهُ سَمِعَ عُبَادَةَ بْنَ الصَّامِتِ، يَقُولُ قَالَ لَنَا رَسُولُ اللَّهِ صلى الله عليه وسلم وَنَحْنُ فِي مَجْلِسٍ " تُبَايِعُونِي عَلَى أَنْ لاَ تُشْرِكُوا بِاللَّهِ شَيْئًا، وَلاَ تَسْرِقُوا، وَلاَ تَزْنُوا، وَلاَ تَقْتُلُوا أَوْلاَدَكُمْ، وَلاَ تَأْتُوا بِبُهْتَانٍ تَفْتَرُونَهُ بَيْنَ أَيْدِيكُمْ وَأَرْجُلِكُمْ وَلاَ تَعْصُوا فِي مَعْرُوفٍ، فَمَنْ وَفَى مِنْكُمْ فَأَجْرُهُ عَلَى اللَّهِ، وَمَنْ أَصَابَ مِنْ ذَلِكَ شَيْئًا فَعُوقِبَ فِي الدُّنْيَا فَهْوَ كَفَّارَةٌ لَهُ، وَمَنْ أَصَابَ مِنْ ذَلِكَ شَيْئًا فَسَتَرَهُ اللَّهُ فَأَمْرُهُ إِلَى اللَّهِ إِنْ شَاءَ عَاقَبَهُ وَإِنْ شَاءَ عَفَا عَنْهُ " ، فَبَايَعْنَاهُ عَلَى ذَلِكَ.
also referenced under: Book 93, Hadith 73 (In-Book) & Volume 9, Book 89, Hadith 320 (USC-MSA)