Shemiras Halashon Halachos

Hilchos Rechilus, chapter 1, section 6

One may not speak rechilus even if this leads to a loss. For example, the people hiring him realize he knows something and order him to tell them the information, and if he refuses will suspect that he is an accomplice to what happened and will fire him leaving him with no job, one must still keep silent. This is the same as other negative commands concerning which one must give all one has not to transgress as explained in Yoreh De'ah (157:1) in the gloss. It is only permitted if revealing the information will lead to benefit, removing harm, or stopping a quarrel. However, this last leniency has many details as we will explain later in chapter 9.

Hilchos Rechilus, chapter 1, section 7

Rechilus is certainly forbidden if keeping silent will only lead to insults and no financial loss. A person must remind himself that this will lead in the next world to him being considered among those who love G-d and his face will shine like the sun as the sages say (Yuma 23): "Those who are shamed and do not shame, hear their disgrace and do not reply… of them the verse says (Shoftim 5:31), And those who love Him are like the sun going out in its might. This verse applies even more if one is insulted due to keeping mitzvos. See what we spoke of at length earlier in Laws of Lashon Hara (1:6).