When does a person commit the sin of calumny or slander? A person commits the sin of calumny or slander when by lying he injures the good name of another.
Devise not a lie against thy brother, neither do the like against thy friend. (Ecclesiasticus 7:13)
When are we obliged to keep a secret? We are obliged to keep a secret when we have promised to do so, when our office requires it, or when the good of another demands it.
What must a person do who has sinned by detraction or calumny, or has told a secret he is bound to keep? A person who has sinned by detraction or calumny, or who has told a secret he is bound to keep, must repair the harm he has done to his neighbor, as far as he is able.
Deeper reading -> CCC 2488-2513