guilt by association

Noun
  1. the attribution of guilt (without proof) to individuals because the people they associate with are guilty
guilt by association
A person is judged by the company they keep, a classic case of guilt by association.