Disclaimer: the story described here happened few years ago and it's all over. I did take some actions back then, but I'm wondering until today if I did the right thing.
Very small company, startup atmosphere, 6 developers at best. I am informal team leader ie. I have been working for longest time and I'm most experienced. We have 3 rooms, one for CEO, one for frontend, one for backend + testers. I am working in the latter one with 3 collagues, or more like friends, our talks were very informal everyday. One day one of my colleagues asks me direct question: how much do I earn? I was surprised, but also I had nothing to hide, so I answered thruthfuly. And then discussion has began between four of us. Private discussion with closed doors.
Mentioned colleague started talking he is in recruitment process for another company and he thinks he will leave, because our CEO said he can't match his salary expectations, but hearing that I'm earning more that he would like to, he is convinced our CEO is lying. This is fine, not the first time I hear something like that from my colleague, I do nothing. But other colleagues joined the discussion and revealed all of them are talking to said competitor. I started to worry: we may lose our backend team and the only one tester. What should I do? Should I tell CEO something is happening? I have completely no obligation to do so, but I feel that company interests are in danger thus my interests are in danger. If I lived in a place where it's easy to find replacements or another job in industry I wouldn't worry that much. But I'm not, company bankruptcy or failure to continue development likely means I will have to move to another city. Losing half of the team sounds like a disaster. On the other hand they said it in trust I won't use that information against them. They just wanted my opinion about local industry market. I really felt they think I was on their side (and actually I was! I'm always ready to offer help whatever the topic is.)
What I actually did:
I told CEO about everything. My reasoning was selfish, I have kids, mortgage, if company fails I'm in big trouble. Said colleague was fired instantly for unethical actions (trying to pull other colleagues from the company). It turned out CEO knows the other CEO and they came to agreement.