At its most extreme, then there’s no reason a GOP-run government could say “any company that has ever donated to, or has an employee who has donated to, a Democrat is ineligible for state contracts” in a bid to freeze donations to the opposition party. The only thing that’s been replaced in that sentence from current laws is “The BDS Movement” with “Democrat”. Obviously that would be an infringement of political speech.
Adding in the KKK or other hate groups into the mix doesn’t really muddy the waters— if a company is (reasonably suspected of) not adhering to other laws, like the Civil Rights Act (and any other equivalent state laws about protected classes), then the state would likely be prohibited anyways from continuing with such a contract, so it’s not the same.