Warning: it's a slow moving business. Lots of subcontractors do cool stuff with modern tech stacks but the bigger companies--think BAE--are dinosaurs.
Defense touches a lot of different aspects of life. GPS came out of the US Air Force and is being maintained by Space Force (I think, might still be Air Force). DARPA funding has been critical for the development of modern robotic limbs. The Missile Defense Agency exists to protect North American airspace from bad things that explode that could come flying over the arctic. Satellite operations—communications, orbit analysis, making sure they don't get hit by debris—is a big area and only getting bigger.
So there's a lot of aspects of the defense industry that are a lot more about defending people than killing people.
There's also lots of opportunity to do work where you would work on weapons or military intelligence. Most weapons development today is about making weapons smaller and more precise to limit the number of innocent people harmed. There's lot of work in the intelligence field trying to quickly and accurate identify targets via satellite images or signals intelligence or videos posted on Telegram and Twitter to more accurately assess threats and capabilities and potential targets.
Joining the defense industry doesn't mean that you have to work on any project they give you. I'm very clear that I won't do anything for the Saudi's because of what they've done in Yemen and vocally opposed projects my past companies have done that I found disagreeable. My security clearance goes with me if I resign so defense companies want me happy cause I ain't easily replaceable. If you see something unethical, there are people who'll listen if you speak up
IMO it's important to keep in mind a proportional balance within the individual's life & energy expenditure. Within that total energy expenditure there's necessarily a system of personal values or even passions, and within that is Ukraine for example, and within that there's "working to directly support outright warfare" among other things like humanitarian donations etc.
For this reason I think 1) it's important to process and decide, 2) it's important to take change over time into account, and 3) it's important to embrace the change and make even experimental changes to one's standpoint when those changes come.
Flexibility is key, but also there's this holistic look at one's focus and interests that is really important.
If you're referring to something like code, and how your code is used, it may be more a matter of a specific license change or a license-time proclamation for example. In this direction I'd offer that it's a good idea to be flexible in making changes to a license over time, as needed. The first big changes in any given direction will always tend to be swingy and generally need adjustment.
It's a big red ethical line for anything I work on.
In the end I've never worked for a defense company but I have worked at two medical companies, so go figure :-)
Seems pretty run of the mill proxy/containment/control war to me.
I know a lot of people changed on/after/due to 9/11/01 too, and I understand why or how they changed -- it just never made any sense to me.