Here is an excerpt from the 16th supplication of Sahifeh Sajadieh, from Imam Sajjad, peace be upon him:
"أَنَا الَّذِي بِجَهْلِهِ عَصَاکَ، وَ لَمْ تَکُنْ أَهْلًا مِنْهُ لِذَاکَ
این منم که از روی جهالت تو را عصیان کردهام در حالی که تو سزاوارعصیان من نبودی"
which means "Oh Lord, I was ignorant and committed the sin, but you didn't deserve my rebellion...". I think someone who deeply believes in this and has such an attitude towards the God shall never do any bad...