There is a common thought that one can judge another person based on their friends. There is a lot of common sense that comes from this. But it is also a flawed generalization. A better way of thinking about it is to say that one can judge another person based not only on their friends, but on how they treat and judge their controversial friends.
Bernie Sanders has friends that have very controversial views on Israel and the Jewish people. He has stood up for them and claimed in unequivocal terms that they are not anti-semites. This is what needs to be focused on. If he is a friendly guy who befriends people with problematic views, that is one thing. But he stands up for their views, and justifies them – that is the main problem.
There are precedents of problematic people supporting honest politicians. Perhaps the best example was Harry S. Truman. Truman was nothing more than a small businessman with some World War I experience. But a powerful Democratic politician, Tom Pendergast was the one who brought him into politics and launched Truman’s career. Pendergast was likened to a big-city boss, who dealt with criminals and promoted Kansas City as a wide-open town with all kinds of questionable practices. But Pendergast also had compassion for the poor and was a genuine city builder. So, Truman felt a deep debt of gratitude to this man despite his questionable reputation. Truman did not praise all of Pendergast’s actions. He focused on being thankful to a person who had helped him personally and helped build Kansas City.
That is how a person should be judged – based on how they treat their friends, and how they speak about their friend’s actions. But they should not be judged solely based on their friend’s actions.