From where do we know that one must be "dan" someone "l'caf zechut"? (that we must judge someone favorably even though from a certain act it might seem they are doing something?
In Pirkei Avos 1:7:
יהושע בן פרחיה אומר, עשה לך רב, וקנה לך חבר יג, והוי דן את כל האדם לכף זכות.
Joshua the son of Perachia would say: Assume for yourself a master, acquire for yourself a friend, and judge every man to the side of merit.