cover one's ass
Also, cover one's hide or oneself. Make excuses or otherwise take action to avoid being blamed, punished, or harmed. For example, The first thing you learn in the army is to cover your ass, or Jane is ingenious at finding ways to cover her hide. The first phrase, considered vulgar slang, dates from the 1960s; the variants are more polite.