Well, not to state the obvious, but you could actually not do the crime!
You could not do rolling stops at stop signs, not spit on the street, and not "forget" to add those few bucks you made at the yard sale onto your tax return, too.
As long as you're not doing or advocating anything that upsets the (current, whatever that may be) government. Whether that's whistleblowing, opposing some local official's actions, telling people that government officials who violate the law should go to jail, being a PITA, whatever. Keep your mouth shut and don't raise your head, and you'll be ok. There's a religious and ethnic element (Muslims and brown people and black people and people with funny names are at far greater risk), but anybody who threatens the status quo, whether that's the town council or the ruling party, can be a target.