The move by the Republican attorney general, who is running for governor in 2026, carries some political risk.