As Keith Whittington noted, some judges are refusing to hire students who they see as endorsing murder of civilians (or threatening to withdraw offers to such students):

Some commenters on that thread suggested that this was an unconstitutional viewpoint-based test for government employment. I appreciate that argument, which I think is apt for many government jobs. But given the Court’s caselaw, I don’t think the First Amendment precludes such viewpoint-based criteria in a judge’s employment decisions for law clerks.

The key precedents on this, I think, come from the line of cases dealing with political-affiliation-based hiring and dismissal of government employees. In these cases—Elrod v. Burns (1976), Branti v. Finkel (1980), and Rutan v. Republican Party of Illinois (1990)—the Court held that, generally speaking, such employees can’t be hired or fired because of their party membership. But the Court recognized that there were exceptions for certain kinds of employees, including ones who work so closely with a high-level official in implementing the official’s views that ideological compatibility is a legitimate employment criterion:

To be sure, this was said in the context of political beliefs, and judges’ job isn’t to implement their political beliefs. But in the course of applying and developing the law, judges do sometimes express their beliefs about law and justice. I think one could likewise say,

Indeed, in my experiences, quite a few judges and Justices—both liberal and conservative—have generally preferred to hire law clerks who share their broad ideological perspectives. Others hired law clerks without regard for ideology, or with little regard for ideology, but that has been seen as reflecting those judges’ particular preferences; both approaches have generally been seen as acceptable. It is likewise constitutionally permissible, I think, if a judge wants to generally be open to hiring clerks with many views, but draws the line at those who have publicly expressed positions that the judge thinks of as radically unjust (such as endorsing the KKK, Nazis, or Hamas).

Whether the judges should do this, or should publicly announce that they are doing this, is a matter I leave to others. But I think that First Amendment law doesn’t forbid them from doing this.