What if you don't question that the change will make money for the business, but have ethical concerns about it (either because of its effect on users, competition, third parties, etc). How do you decide if you have ethical concerns?
What if you are writing firmware for brakes that is going to get deployed to thousands of cars?
>If that bothers you, talk to a union rep
What union?
Even if there was a union, this entirely avoids the central question: what behavior is ethically concerning?
>If you feel as you you ethically must do any of those, quit first.
This answer entirely avoids the ethical question of '(when) should you do any of those things'. All it says is "quit first" (a position which solidifies your moral high-ground, but which I do not agree with from a purely ethical standpoint).
Exactly. Software professionals don't have a (powerful) union or trade association, so our ethical concerns are not significant from a business standpoint. The company hired you to do what the company wants, not what you think is best. You have no leverage to enforce your views.
Making an ethical stand can get you fired or blacklisted from future promotions. Or it might get you recognized and rewarded by the company. It all depends on the company leadership. Do you believe your company leadership has the same respect for ethics as you?
If that bothers you, talk to a union rep, because few businesses in existence would rather do the right thing if doing the wrong thing makes an extra buck. If the money flows in, those maintenance costs will keep you employed; if it doesn't, those costs won't need to be paid.
You don't refuse to deploy, you don't leak, and you don't shame. If you feel as you you ethically must do any of those, quit first. (Don't mention your intentions to HR at your exit interview.)