Keeping secrets can be either good or bad. Don’t be afraid if you do because, God himself keeps secrets.
However, when it comes to sin, God wants them confessed to the least of it, and he forgives them all. “He that covereth his sins shall not prosper: but whoso confesseth and forsaketh them shall have mercy” (Proverbs 28:13). Apostle James says, “Confess your faults one to another, and pray one for another, that ye may be healed…” (James 5:16).
There is no use trying to hide our sins from God. “…Of a truth it is, that your God is a God of gods, and a Lord of kings, and a revealer of secrets…” (Daniel 2:47). The Lord said, “For nothing is secret, that shall not be made manifest; neither any thing hid, that shall not be known and come abroad” (Luke 8:17).
Listen to what Job said;
Then Job answered the Lord , and said, I know that thou canst do every thing , and that no thought can be withholden from thee. Who is he that hideth counsel without knowledge? therefore have I uttered that I understood not; things too wonderful for me, which I knew not. Hear, I beseech thee, and I will speak: I will demand of thee, and declare thou unto me. I have heard of thee by the hearing of the ear: but now mine eye seeth thee. Wherefore I abhor myself, and repent in dust and ashes.” Job 42:1-6
Anyway, we see in scripture that there are some things that people should know yet there are some which they should not know about. Deuteronomy 29:29 says, “The secret things belong unto the Lord our God: but those things which are revealed belong unto us and to our children for ever, that we may do all the words of this law.”
Keeping secrets can be good like in the story of Esther, Samson and the spying of Jericho. Jesus asked several people he healed to keep miracles to themselves too.
Proverbs 11:13, “A talebearer revealeth secrets: but he that is of a faithful spirit concealeth the matter.”
God’s concern is how secrets are used, whether to protect others or to hurt them, and we are of them that build.