I put this in a response to a comment below, but I’m going to repeat it here.
First of all, ethics and business should no longer be in the same sentence. The purpose of a for-profit company is to make profit, not to be ethical. Most companies will do everything they can to push the law as far as it will go without breaking, and at that point any ethics are long since dead and buried. There is a fable about a turtle and a scorpion crossing a river that comes to mind; long story short, the scorpion stings the turtle after promising that he won’t, and explains that it’s his nature to do so. You cannot expect a for-profit company to act ethically; ethics increase costs, and lower profits, so they are the antithesis of capitalism. Unbridled capitalism has run amuck; it will destroy the world at this rate.
Second, a developer does not need ethics to decide whether or not to cooperate with something sketchy. The only question they need to ask is, “If it became public knowledge, would the company be in trouble?” If the answer is “no”, then code away, your family needs to eat. If the answer is “yes”, well, code away, your family needs to eat, but understand that the risk is that you will be made a scapegoat for any bad acts committed by the company. Volkswagen tried to do this with the recent emissions cheating scandal. The software was initially considered faulty (not malicious), and was blamed on the software engineers, not the upper management drones who told the engineers what to do.