On the authority of Abū Sa'īd Al-Khudrī رضي الله عنه the Messenger of Allāh ﷺ said:
Let not fear of the people prevent a person from saying the truth if/when he knows it.
In another wording: "if/when he witnessed or heard it."
[At-Tirmidhī /Ibn Mājah/Silsilatus Saheehah/Authenticated by Shaykh Al-Albānī].
Al-Imām Al-Albānī رحمه الله stated:
In this narration there is the stressed prohibition of concealing knowledge due to the fear of the people or desiring livelihood. Everyone who conceals it due to their (the people's) harming (of him) with different types of harm like: beating, cursing, cutting off the person's provisions, not being respected (by them), and the likes, then he enters into the prohibition and is in opposition to the Prophet.