Tar (someone) with the same brush

To say that someone or something has the same bad qualities as someone or something else.

The newspapers tarred the president of the company with the same brush as the bad managers of the company.