“Keeping your nose clean” is to behave in such a way that you’re above reproach. No one can accuse you of wrong. For instance, a politician entering an election campaign might be warned by his staff to keep his nose clean. The emphasis is on appearance, though it doesn’t necessarily imply hypocrisy.