Ubida b. as-Samit reported
While we were in the company of Allah's Messenger (may peace be upoi him) he said: Swear allegiance to me that you will not associate anything with Allah, that you will not commit adultery, that you will not steal, that you will not take any life which it is forbidden by Allah to take but with (legal) justification; and whoever among you fulfils it, his reward is with Allah and he who commits any such thing and is punished for it, that will be all atonement for it And if anyone commits anything and Allah conceals (his faultfls), his matter rests with Allah. He may forgive if He likes, and He may punish him if He likes.