Recent green card holders, asylees, and refugees get federal protection, except when a law requires or permits otherwise. The other commenter’s company has a blanket rule of allowing none of these categories. Approximately this got SpaceX into trouble with the DOJ recently.
Some state or local laws offer additional protections beyond federal law, including NYC for all immigration statuses, except as required or allowed by other applicable laws. (So, for example, NYC doesn’t pretend that companies have to hire people who don’t already have employment authorization.)
I believe there is some protection against discriminating against greencards, but not visas