In Cali it is. These laws were enacted in the 30/40s when people were blacklisted for being Commies.
https://leginfo.legislature.ca.gov/faces/codes_displaySectio... https://leginfo.legislature.ca.gov/faces/codes_displaySectio...
It would be interesting if this goes to the supreme court and the conservative court rules these laws unconstitutional on freedom of association grounds.