> How can you be so sure that I’d only be helping the good side of the DoD?
I answered this by asserting your premise, the DoD has a good side, is unnecessary. I further allowed for the possibility you're not even American.
> Do I [end up defending the right of more malicious actors to acquire technology from the US below cost through low-cost, high-yield hacking]?
I answered this by posing the leading counter-question, "Don't you still want to make it as expensive as humanly possible for other countries to get the plans to those weapons?" And that appear to be the fairly strong position it is, considering I rejected your requirement of there being anything good about the DoD, and further rejected any implication that you're even American.
The point is this: if I help them, how can I ensure that this help goes towards things like preventing other countries from obtaining nuclear weapons, and not blowing up weddings?
Concretely, blowing up weddings is a failure of guidance systems, that's an offensive problem. Those are avionics and fire control problems, not network security problems. Avionics and fire control are highly specialized domains. You don't accidently write some code that helps with those problems. They have their own languages, their own compilers, their own chip architectures. The developers work in places you hear about on the History channel, like China Lake.
Conversely, the defensive work of improving the network security that protects the plans and software for offensive systems, including those avionics and fire control software repositories, is good for everyone not just the rabid dogs of the DoD.