In terms of "antithetical values", the machine learning project ml5js.org actually did something about this. They bound their open-source license to a Code of Conduct¹, which forbids the use of their ML software for (1) discriminating against marginalized communities, (2) building tools that disingenuously manipulate public opinion, (3) building tools of mass surveillance and prediction to repress the rights of peopl…
How to define who is marginalized by whom? And by what actor? Creators of the code, users, customers? What if both groups think they are marginalized by the opposing one? Who can use the code then?
Forbidding manipulation of public opinion is also too lax of a term to use that way. Look for example into such polarizing topics like pro-life/pro-choice debate worldwide. Each side can accuse the other of manipulating the public while still believing they are in the right.
Controlling weapons is probably the point that could be easily defended in terms of being rather concrete, but I think it could be placed as some kind of custom license (IANAL).
Putting things that should be confined to decisions made by some kind of regulatory body like a country’s judicial system in a text file is rather a pointless signaling in my opinion, although it can be easily understood why somebody would want to include something like that.