I don't think anyone actively works to do evil things in engineering. However, it is possible/easy to end up making something that is used for evil by someone else later - and justifying making weapons through notions of "defense" has been commonplace for years (although I don't agree with the justifications, generally).
I've never quite been happy with open source licenses for this reason - and I've considered writing a pacifists' OSS license with a clause along the lines of:
"No license is granted for any purpose of deliberate harm or death to humans [and other intelligent species]; whether in a deliberate weapon or implement of torture, or whether in a targeting or guidance system for any such device. Missile 'sheild's, designed and only usable for blocking incoming weapons are excluded from this category."
You could hypothetically write additional clauses for other objectionable things, pornography and fossil fuel drilling/mining come to mind.
It wouldn't stop people reimplementing your code from a specification/summary, as many companies do with OSS that they need to use but can't re-release, but it does make making weapons and such more expensive to make (which will decrease supply, assuming your code was ever in contention for use in such a system.)
I've never quite been happy with open source licenses for this reason - and I've considered writing a pacifists' OSS license with a clause along the lines of:
"No license is granted for any purpose of deliberate harm or death to humans [and other intelligent species]; whether in a deliberate weapon or implement of torture, or whether in a targeting or guidance system for any such device. Missile 'sheild's, designed and only usable for blocking incoming weapons are excluded from this category."
You could hypothetically write additional clauses for other objectionable things, pornography and fossil fuel drilling/mining come to mind.
It wouldn't stop people reimplementing your code from a specification/summary, as many companies do with OSS that they need to use but can't re-release, but it does make making weapons and such more expensive to make (which will decrease supply, assuming your code was ever in contention for use in such a system.)