Bite one’s tongue

To try not to say something that you really want to say.

I had to bite my tongue and not tell our boss what happened.