Always think good of what your friend does, unless you hear something definite about his conduct that would compel you to part with him. Beware of your enemy and be cautious with your friends, except the faithful and truthful among them and certainly, only those who fear Allaah are faithful and truthful to their friends.
As Abu Hatim said:
“The wise person neither stains his own honor nor teaches himself the ways and means of evil by accompanying the wicked. Rather, the wise strives to protect his honor and better his own self by associating with the righteous. Ultimately, experience exposes the true reality of all people as compared to what their outward appearance suggests” [Rawdat Al-Uqalaa]