Ubada bin Samit reported that the Messenger of Allah ﷺ took from us the same pledge he took from the women, on six matters, that we would not associate anything with Allah, that we would not steal, that we would not commit adultery, that we would not kill our children, that we would not slander one another, and that we would not disobey him in what is right. Whoever among you commits any of these offenses and has the prescribed punishment carried out upon him in this world, that punishment is his expiation. And whoever has it deferred, his affair rests with Allah Almighty. If He wills, He punishes him, and if He wills, He shows him mercy.
حدثنا إسماعيل بن إبراهيم أخبرنا خالد الحذاء عن أبي قلابة قال خالد أحسبه ذكره
عبادة بن الصامت أخذ علينا رسول الله ﷺ كما أخذ على النساء ستا أن لا تشركوا بالله شيئا ولا تسرقوا ولا تزنوا ولا تقتلوا أولادكم ولا يعضد بعضكم بعضا ولا تعصوني في معروف فمن أصاب منكم منهن حدا فعجل له عقوبته فهو كفارته وإن أخر عنه فأمره إلى الله تعالى إن شاء عذبه وإن شاء رحمه
Its isnad is sahih. It is found in Muslim 3/1333 no. 1709, and Tirmidhi 4/45 no. 1439, who said, hasan sahih, both in the chapter on legal punishments, and Nasai in the chapter on faith 8/108 no. 5002, and Ibn Majah 2/868 no. 2603, and Darimi in the chapter on military expeditions 2/290 no. 2452.