Leviticus 5:1

1 “ ‘If anyone sins because they do not speak up when they hear a public charge to testify regarding something they have seen or learned about, they will be held responsible.

Read Leviticus 5:1 Using Other Translations

And if a soul sin, and hear the voice of swearing, and is a witness, whether he hath seen or known of it; if he do not utter it, then he shall bear his iniquity.
"If anyone sins in that he hears a public adjuration to testify, and though he is a witness, whether he has seen or come to know the matter, yet does not speak, he shall bear his iniquity;
“If you are called to testify about something you have seen or that you know about, it is sinful to refuse to testify, and you will be punished for your sin.