“… Beware ye of the leaven of the Pharisees, which is hypocrisy. For there is nothing covered, that shall not be revealed; neither hid, that shall not be known.” (Luke 12:1,2)
If there is one thing that is absolutely certain in Scripture it is this: there is no sin, no transgression, that can remain indefinitely covered and hidden from the eyes of man. It will eventually come out in all its shameful and ugly detail. God did not allow even His choicest servants to get a pass. Noah, Abraham, Moses, David, all had their deeds, both good and bad, exposed for the world to see.
God is a God of truth. Falsehood and deceit are an abomination to Him. He is a God of abundant mercy, but He shows that mercy to those who confess and forsake their sin, not to those who cover it. (Prov. 28:13)
No matter how well we appear to be doing we cannot truly prosper in God if we are justifying or trying to hide transgression. If we have sinned against a man we must go to that man and acknowledge our wrong and repent, no matter what the cost of our admission. If we have sinned against God, we must acknowledge the same and accept whatever discipline He chooses. To try to escape the consequences of sin by hiding it will not work.
One day we will have to face up to our actions. Better to take our chances now than to wait for the final judgment. Confession then will be too late.