It is reported that the Prophet :swalalahu alaihi wasallam has said:
Whosoever covers (the sins of) a Muslim, Allah will covers (his sins) on the Day of Judgment. (Reported by Bukhari)
If we find it too difficult to keep it secret, the most we are allowed to do is discuss the issue with the person, in private, and try to encourage them to stop committing the sin(s).
Allah has said:
The believers, men and women, are Auliyâ' (helpers, supporters, friends, protectors) of one another, they enjoin Al-Ma'rûf (i.e. Islâmic Monotheism and all that Islâm orders one to do), and they forbid (people) from Al-Munkar (i.e. polytheism and disbelief of all kinds, and all that Islâm has forbidden). (Quran, 71:9)