John Forge considers the moral dilemma of the weapons designer, in Philosophy Now:
The legendary AK 47 assault rifle was invented in 1946 by Mikhail Kalashnikov. It was issued to the armies of the old Warsaw Pact countries and has been used in many conflicts, eg by the North Vietnamese Army (NVA), Soviet soldiers in Afghanistan, and even this year by Al Qaeda operatives in Iraq. One might say that it was a good thing that the NVA had access to a reliable weapon in the face of the invading enemy forces, and that they were justified in using it to defend their homeland. One might also look at the Vietnam war some other way, but I will accept this interpretation here. On the other hand, it is much more difficult to argue that the Soviet forces had any right to invade Afghanistan. So we might contrast the uses to which the AK 47 was put in Vietnam with Afghanistan, and we could mark this contrast by saying that one was a just war waged by the NVA, and the other an unjust war waged by the Soviet Union. Whatever interpretation one puts on those two conflicts, almost no-one sane would condone the use of the AK 47 in killing civilians, for instance Shiites in Iraq.
More here.