He is the Rock, His work is perfect; for all His ways are justice, a God of truth and without injustice; righteous and upright is He." Deuteronomy 32.4
How wonderful is the Lord our God! Everything in Him is perfect, glorious and majestic! As the bear minimum Perfect imperfection? How would the Perfect put up with a minimum of impurity? And the Most Holy bear the profane? But by faith, practiced in the Word of His Son Jesus, we are justified. Justified to be perfect, pure and holy... How can we understand such greatness?
"For what does the Scripture say? 'Abraham believed God, and it was accounted to him for righteousness'." Romans 4.3
Abraham proved his faith to God by obeying His Word and because of that he was justified by God.
In other words, Abraham was a sinner like anyone else, but his obedience made him worthy before God.
Therefore, those who are obedient to the Word of God are forgiven, those who are disobedient are condemned.
"... not having my own righteousness, which is from the law, but that which is through faith in Christ, the righteousness which is from God by faith..." Philippians 3.9
The righteousness of Paul did not come from his behavior before God. He was justified because he maintain his faith alive, practical and active in the Lord and Savior Jesus Christ. That is why he was known as the apostle of the gentiles.