None of us here know the facts.
If the "attack" was in the course of judicial proceedings, or involves a ruling you disagree with, there is immunity from suit. If by "attack" you mean some physical assault conducted outside the court by judge as private citizen, report it to the police. If a physical assault in the courtroom, which I doubt, report it to the judicial conduct commission or agency.