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.