That new alloy you invented, that can be used for better armor.
That better tool you invented, that can be used for manufacturing weapons.
That medicine you invented, that can be used for keeping soldiers in the fight.
That harmless energy-source you invented, that can be used to power machines of war.
That weird nanomaterial you discovered, that can be used to build better electronics that can steer even deadlier machines of war.
That weird math you discovered, that could be used to solve a mathematical problem that eventually makes it possible to program artificial-intelligent killer-robots.
2017 scientists invented a device that can suck drinking-water out of almost-dry air. That can be used to supply military commandos behind enemy-lines.
In fact, when I studied physics, ethics in science was one of the first talks given to us in the first semester. The takeaway was that you cannot prevent abuse but that you have to do your best to prevent it anyways.
As for myself, one of my recent projects was about developing something that could very easily have been used for evil. It turned out to be a total failure.
Professionally, that's bad for my career.
But ethically I am secretly a little bit relieved that we failed.