Shemiras Halashon Halachos
Hilchos Lashon Hara, Opening – positive commands (5) Sometimes, the receiver of the lashon hara transgresses the positive command of (Vayikra 19:17), "You shall surely rebuke your fellow." This applies if someone told him lashon hara that denigrated another person, and he can rebuke him that he should stop speaking, and he does not rebuke him.
Hilchos Lashon Hara, Opening – positive commands (6) If a person sits with a group of wicked people who habitually speak lashon hara, he transgresses the positive command (Deuteronomy 10:20), "You shall cleave to Him," which commands us to cleave to Torah scholars, to eat and drink with Torah scholars, and to do business with them in order to learn from their deeds. If someone cleaves to a group of wicked people, he certainly transgresses this positive command.