That's what the OT states:
Leviticus 4:1-12, 4:13-35 and 5:14-19
Numbers 15:22-29
And if the whole congregation of Israel sin through ignorance, and the thing be hid from the eyes of the assembly, and they have done somewhat against any of the commandments of the Lord concerning things which should not be done, and are guilty; .. And he shall do with the bullock as he did with the bullock for a sin offering, so shall he do with this: and the priest shall make an atonement for them, and it shall be forgiven them. (Leviticus 4:13.20)
And if a soul sin, and commit any of these things which are forbidden to be done by the commandments of the Lord; though he wist it not, yet is he guilty, and shall bear his iniquity. And he shall bring a ram without blemish out of the flock, with thy estimation, for a trespass offering, unto the priest: and the priest shall make an atonement for him concerning his ignorance wherein he erred and wist it not, and it shall be forgiven him. It is a trespass offering: he hath certainly trespassed against the Lord. (Leviticus 5:17-19)
And it shall be forgiven all the congregation of the children of Israel, and the stranger that sojourneth among them; seeing all the people were in ignorance. (Numbers 15:26)
That's a good study, and I was in a debate once with a poster who insisted that one must confess all his/her sins to be saved. However, as I told him, we sin many times without realizing it (failing to love God with all our being, and others as ourselves, misusing everything from our brain to our feet). However, salvation being on the basis of faith being counted for righteousness, rendering us accepted in the Beloved on His behalf and positionally seated with Him in Heaven, (Rm. 4:5; Eph. 1:6; 2:6) then having received The Atonement by true faith, to all that call upon him in truth, (Psalms 145:18) out of a reverential, penitent, contrite heart, (Psalms 34:18; 85:9; Isaiah 66:2) which does confess sin once he/she is convicted of it, as David exampled, (2 Samuel 12:13) then unconfessed sins of ignorance are automatically forgiven, while the rebellious will be chastened to effect such. As we also can be in order to change our character. (1 Corinthians 5:5; 11:32; Hebrews 12:1-13) But if salvation were not of faith then one would need to know and confess all his sins.