For instance, I think it's likely that glassdoor would be federally protected in the US under section 7 of the NLRA (which protects talking about pay when it's part of a concerted effort to improve pay), and even it's it isn't it's almost certainly protected in California by section 232 of the labor code, which states:
No employer may do any of the following:
a.Require, as a condition of employment, that an employee refrain from disclosing the amount of his or her wages.
b.Require an employee to sign a waiver or other document that purports to deny the employee the right to disclose the amount of his or her wages.
c.Discharge, formally discipline, or otherwise discriminate against an employee who discloses the amount of his or her wages.
(IANAL)
Edit: Good resource with more information - https://www.dol.gov/wb/media/pay_secrecy.pdf