Aides to then-Attorney General Alberto Gonzales violated federal law and Justice Department policy by using a political litmus test when hiring career lawyers and immigration judges, according to a report by the department’s two watchdog offices.

The Inspector General and the Office of Professional Responsibility found that former White House liaison Monica Goodling and former Chief of Staff D. Kyle Sampson measured job candidates by their political affiliations. Goodling’s and Sampson’s actions amounted to illegal misconduct, the report says.