What to do if someone asks you about a past sin you committed? Should one lie or expose it?

It’s not allowed in any case to tell about your past sins to anybody.