Most of my code is licensed LGPL-3.0. That's fine, it's a pretty good license, but I decided to add something recently. Whether or not it would hold up in court, I don't know, but all of my active (non-archived) projects now have this addition at the top of their license file:
You may not use the code in this repository for the governments, military, or law enforcement of any NATO member; or in applications or platforms designed or intended for use by neo-Nazis, white supremacists, far-right conspiracy theorists (such as Q-Anon), or other similar right-wing groups.
The point of this addition is to prevent usage of my libraries by companies and governments (and sub-government organizations) that are harmful. While there are thousands of specific organizations I could list, hopefully this broad list will do the trick and effectively give me room to sue if my code is used to incite hatred, bomb foreign countries (or drop bombs domestically as in the MOVE case in Philadelphia), or something similar that wouldn't align with my own values as a Buddhist and a Communist.