Ginni and Clarence Thomas v 28 U.S. Code § 455

Disqualification of justice, judge, or magistrate judge

“(a) Any justice, judge, or magistrate judge of the United States shall disqualify himself in any proceeding in which his impartiality might reasonably be questioned.”

If you really want to know where the bar is re spouses of federal judges, read the entire statute.