Michael Dorf, Andrew Koppelman, and I have written elsewhere about why we think laws banning government contractors from refusing to deal with Israeli companies are generally constitutional. In this respect, we think such bans are like the government barring universities that get government funds from excluding military recruiters from recruitment fairs, or barring businesses that get government funds (and even ones that don't) from discriminating based on race, religion, etc. Refusals to deal are unprotected conduct, not protected speech. (The long version is here.)
Some people, however, have objected to a different provision of the laws: that contractors certify that they aren't boycotting Israeli companies through such refusals to deal. This certification, some have argued, is itself an impermissible speech compulsion.
I think that's mistaken; these requirements are like any other contractual provisions on which the government insists (in particular, like contractual warranties). The Arkansas anti-BDS law, for instance, provides,