Abraham said to the LORD: Will not the Judge of all the earth do right?
The Judge of all the earth is God Almighty the God of the Bible. He is just and righteous. He always does right.
King James Bible (Cambridge Ed.) ... Does God distort justice, or does the Almighty distort righteousness? ... Doth God pervert judgment, or doth the Almighty overthrow that which is just? ... he is the Judge of all the earth, that does and will do right; to subvert a man in his cause, he approves not of in others, and will never do ...
King James Bible