Secrets are a punishment.
Why do you think secrets are a punishment?
I mean I'm going to punish friends who tell my secrets.
I understand being frustrated by people who tell your secrets, but taking revenge on them won't help. If you do something to punish them, it will just make them more angry at you. You should talk to them and tell them how you are feeling instead.
Just remember that secrets are a punishment.
If someone does something to hurt or betray you, you should talk to them about how their actions have impacted your life. Taking time to discuss this will help you feel better and prevent the person from repeating the same behavior.