I would suggest the answer is: if it was easy, it wouldn't be ethics.
Re:Ethics can’t be a side hustle
by randomsearch on Wednesday February 21, 2018 @01:18PM
(#16431588)
Generally: if the company is pretty self-evidently evil, and you have feasible alternatives, choose those alternatives.
Also, hypotheticals are fairly unhelpful compared to real cases.
Consider whether you would personally carry out the acts involved - would you defraud middle america for your own benefit? Would you fire on civilians on behalf of a dictator buying your product?
And what if you work at/for such a company, but you're not a programmer, but e.g. a cleaner, are making ends meet, and you're lucky to have a job in the first place?