The starving designer code of ethics. Sometimes you are not in a position of power to make changes.
If you have to put food on the table, do that. But if you have the ability to speak up about something morally or ethically wrong, do that. I’ve been at previous jobs (Mostly starting out in my career) where I didn’t feel good about making something. I was young, naive and essentially without power. If I said, I won’t do that, there would have been many other people willing to take my spot. What you can do is suggest something in a slightly different direction.
There are so many young designers trying to make their way into the design world. If you can’t get in fast, it’s going to be hard to get in at all. Most jobs want you to have some experience. So I am not saying be quiet and submissive. If you are in that same position as I was, just be smart and wait for your moment. It will come. After you have some design under your belt, you can say no to projects, or companies. After a while, you are going to say “I'm too old for this shit”. But if something is illegal, get out fast.
As for larger companies, they have a lot more leverage. Especially if they have a good reputation as well as the means to say no to an unethical project. Speak up when they are debating whether or not they want to take on a client or project that you know won’t be good for society. And commend them when they refuse to sign with them. Say thanks for being a good person. The world will thank you one day.
Money and ethics are tricky. So use your best judgement and trust your gut.