keep (one's) hands clean
To keep a distance from or avoid becoming involved with something that is or might be considered unsavory, immoral, illicit, or illegal. You're not going to get very far in this business if you're worrying about keeping your hands clean. She always kept her hands clean during her campaigns, avoiding the smear tactics and mud slinging so common in the political world.