A judge must avoid all impropriety and appearance of impropriety. This prohibition applies to both professional and personal conduct. A judge must expect to be the subject of constant public scrutiny and accept freely and willingly restrictions that might be viewed as burdensome by the ordinary citizen.
https://www.uscourts.gov/judges-judgeships/code-conduct-united-states-judges
Not that SCOTUS is held to the same code of conduct that all other federal judges are held to, of course.