Mishkat al-Masabih 18
وَعَنْ عُبَادَةَ بْنِ الصَّامِتِ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَحَوْلَهُ عِصَابَةٌ مِنْ أَصْحَابِهِ: بَايَعُونِي عَلَى أَنْ لَا تُشْرِكُوا بِاللَّهِ شَيْئًا وَلَا تَسْرِقُوا وَلَا تَزْنُوا وَلَا تَقْتُلُوا أَوْلَادَكُمْ وَلَا تَأْتُوا بِبُهْتَانٍ تَفْتَرُونَهُ بَيْنَ أَيْدِيكُمْ وَأَرْجُلِكُمْ وَلَا تَعْصُوا فِي مَعْرُوفٍ فَمَنْ وَفَى مِنْكُمْ فَأَجْرُهُ عَلَى اللَّهِ وَمَنْ أَصَابَ مِنْ ذَلِكَ شَيْئًا فَعُوقِبَ بِهِ فِي الدُّنْيَا فَهُوَ كَفَّارَةٌ لَهُ وَمَنْ أَصَابَ مِنْ ذَلِكَ شَيْئًا ثُمَّ سَتَرَهُ اللَّهُ عَلَيْهِ فِي الدُّنْيَا فَهُوَ إِلَى اللَّهِ: إِنْ شَاءَ عَفَا عَنْهُ وَإِنْ شَاءَ عَاقَبَهُ فَبَايَعْنَاهُ عَلَى ذَلِك
From ʿUbadah ibn as-Samit, who said: The Messenger of Allah ﷺ said, while a group of his Companions were around him: "Pledge allegiance to me that you will not associate anything with Allah, nor steal, nor commit zina, nor kill your children, nor bring a slander that you invent between your hands and your feet, nor disobey in what is right. Whoever among you fulfils it, his reward is with Allah. Whoever commits any of that and is punished for it in this world, it is an expiation for him. And whoever commits any of that and then Allah conceals it for him in this world, his matter is with Allah: if He wills He pardons him, and if He wills He punishes him." So we pledged allegiance to him on that.