A recruiter once asked me, before talking about anything else, if there were any software development jobs I wouldn't consider doing. I said something along the lines of "nothing involving gambling or the military" and I think that was as far as I got before he politely ended the call.
I guess it's better for both parties to be clear at the outset. We should all think about where we draw the line.
Ultimately if you're working on weapons tech you don't get any say in how the technology will be used, there are very very few things that can only be deployed defensively. Because defending an open line in a war theatre can totally be an offensive action. On the flip side plenty of military offensives have been justified as preemptive defense. Not only the lines are blurry, they're not under your control unless you're actually in the chain of command.
I guess it's better for both parties to be clear at the outset. We should all think about where we draw the line.