According to this law: https://www.nlrb.gov/resources/national-labor-relations-act employees can talk about things that matter to them, salary being one of them. And the National Labor Relations Board (NLRB) includes pay secrecy language in contracts as illegal, and even if you sign an NDA, it is still your right to talk about your salary.
The consequences for violation aren't usually very serious, so companies aren't too worried about violating the law, unfortunately. They usually have to provide back pay to the employee and/or offer the employee their job back (if they were fired). Obama signed an executive order that increased penalties for companies contracting with the government: they can lose their contract.
This law doesn't include contractors, ag workers, employees of federal, state, or local gvmt, or those employed by interstate rail and airline companies.
It does cover you if you aren't in a union.
Violations should be reported to the NLRB and they'll investigate it.
Source: https://www.npr.org/2014/04/13/301989789/pay-secrecy-policie... and https://www.govdocs.com/can-employees-discuss-pay-salaries/