Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am a researcher, and in my research I do a lot of programming. I am a big fan of the open-source concept - especially in research, where transparency and reproducibility is already a big part of the culture. I gladly contribute as much as I can to the community, and releasing my code for anyone to use is part of that.

However, in research there is always a certain measure of uncertainty about what the stuff you produce will be used for. I fully understand that I can't copyright any results or conclusions - but I can protect how others use my code, and I would like to make sure that there is no (legal) way to incorporate software I produce in military applications.

I've read through a few of the shorter ones of the common OSS licenses, and summaries of some more, but they all seem to focus solely on the questions "do you earn money on my code?" and "do you make my code available with your program?" - nothing about what the program actually does with the code.

Are there any good open-source licenses that explicitly prohibit all kinds of military applications?

Update:

After reading up some more on how OSS works, I've realized that a license that meets my needs by definition will not be open-source, since open-source licenses cannot discriminate against fields. Thus, I'm rather looking for a license that is like an open-source license, except that it prohibits military use. I want this license to be already existing, authored or at least reviewed by someone who actually knows licensing, since I don't.

Also, in response to a couple of remarks that this will be difficult to enforce: yes, I realize that. But this is more for myself than for the legal implications; if I use a license like this, and a military organization uses my code anyway, they are breaking the law and they are doing it despite my explicit instructions not to. Thus, the potentially gruesome things that they do with applications that include software I've written are no longer "on my conciousness", since they stole the software from me. (And somewhere I have a naïve hope that if they need something I've done, and my license prohibits them from using it legally, they'll get someone elses program that does the same thing and allows them to use it. Not that governments always do, but they always should abide by the law...)

It's a moral safeguard, so to speak, rather than something I actually expect to bring up in court (if my mediocre code is ever used by CIA...)

share|improve this question
8  
Just so you know, any license that places restrictions on use will necessarily fail OSI or FSF approval, so you won't find any suitable licenses from those groups. Such a license won't be "open source" in the sense of "complies with the OSI's open source definition," though it may be "open source" in the more general sense of "having publicly-available source code." –  apsillers May 22 '13 at 17:14
3  
If it is a moral safeguard that you want then a simple license.txt with "This code may be freely used and distributed for any non-military purposes." should cover that. If you are looking for a sound legal footing then you need a lawyer and not the internet :D –  Mike May 22 '13 at 17:50
3  
@Mike In order to craft a new license, consulting a lawyer is required. However, there may be an existing license that has already been vetted by an outside organization that meets the desired criteria. Seeking that license is an appropriate question. –  Thomas Owens May 22 '13 at 17:52
18  
What exactly is "military use"? Would you allow use by a military organization (say, the US Army) in a humanitarian aid operation, or in a hospital? Would use by a non-military organization (say, IBM) supporting a military operation be okay? Could guerrilla forces use your stuff? Are intelligence agencies covered by your military restriction? Will your conscience be clear if a sweatshop boss (clearly non-military) uses your stuff to monitor his employees? And why do you think that you're responsible for what other people do with something you wrote and gave away, anyway? –  Caleb May 22 '13 at 17:55
7  
One more thing: if you do feel responsible for what other people do with your software, and if some army uses your software in the process of wreaking havoc on innocent people, is a tiny little line in your license that says "you can't do that" really going to make you feel any better? You've already acknowledged that you don't expect to enforce it... –  Caleb May 22 '13 at 17:58
show 14 more comments

4 Answers 4

up vote 13 down vote accepted

How would one enforce such a license?

Would you prohibit any military use? If the software checks air pressure in tires, and someone decides to use it on a military Hummer, is that a prohibited use? Can people in the military industrial complex use it to plan their monthly picnic?

Would it be an acceptable use if the software improved ballistic missile trajectories, and the improved accuracy of the weapon prevented civilians from being killed? Or would any use in a weapon be prohibited?

These are the kinds of questions you have to ask yourself, if you want to make a software license that satisfies your sensibilities.

Nevertheless, I'd try an keep it simple. Yahoo's Terms of Use state that their software must not be used

"to operate nuclear facilities, life support or other mission critical applications where human life or property may be at stake."

That's probably as good a clause as any, if you add the word "weapons" to the prohibited list of uses.

share|improve this answer
1  
Yes, that is a good clause. However, would a nuclear power plant fall under "nuclear facilities"? If so, I might have to add "military" there - my research field is nuclear fusion... –  Tomas Lycken May 22 '13 at 18:22
1  
It really depends on your motivations. Some people don't like nuclear power. Better military software can and does save lives (on both sides), because it makes more accurate weapons, but I doubt that you consider that an acceptable use. –  Robert Harvey May 22 '13 at 18:25
8  
Oh, and Yahoo adds the clause, not out of any moral obligation, but because software designed for life-critical applications requires a higher rigor by law, a rigor that Yahoo does not (and does not want to) comply with. –  Robert Harvey May 22 '13 at 18:26
    
Yeah, I realized that was the reason to include "life support and other mission critical applications" - that suits me as well, but since I'm probably going to base this on the MIT license anyway, there's a huge ALL CAPS section at the bottom saying "Hey, I don't know if this works or not. You test it yourself, and don't yell at me if your stuff breaks." So I'm not really feeling I'm making any promises about saving lives either... –  Tomas Lycken May 22 '13 at 19:47
    
Starting from the MIT license and this answer, this is what I came up with –  Tomas Lycken May 22 '13 at 20:09
show 1 more comment

I found this explicitly non-military license for an encryption algorithm called OCB.

2.1 License. Subject to your compliance with the terms of this license, including the restrictions set forth in Section 2.2, Licensor hereby grants to you a perpetual, worldwide, non-exclusive, non-transferable, non-sublicenseable, no-charge, royalty-free, irrevocable license to practice any invention claimed in the Licensed Patents (i) for any Research Use, (ii) for any Noncommercial Use, and (iii) in any Software Implementation.

2.2 Restrictions

2.2.1 The license above does not apply to and no license is granted for any Military Use of the Licensed Patents.

You ought to be able to modify it to refer to your own code, and be covered the way you want.

share|improve this answer
    
They also have a version of the license that doesn't have a military use exclusion. Not sure why they do that, but it's not uncommon for software manufacturers to have a "dual license" model so that users can pick the license that best suits them. –  Robert Harvey May 22 '13 at 18:31
    
@RobertHarvey - Yeah, I was puzzled by that too. I think that there's the "Any use so long as it's open source", license, the "Any use so long as it's not military or commercial" license, and the "contact me" license. So an open source military project is fine, but a closed-source one is not. –  Bobson May 22 '13 at 18:34
2  
@Bobson - your edit makes your answer much more clear. Thanks! –  GlenH7 May 22 '13 at 18:37
1  
@GlenH7 - Not a problem - it's definitely a valid point. Making any significant change without a lawyer is definitely a bad idea. –  Bobson May 22 '13 at 18:39
add comment

Here's a starting point. It is Canadian Mind Products policy on "no military use" of their software. Canadian Mind Products is Roedy Green's company. Roedy has done some absolutely brilliant work, that has not gotten nearly enough mainstream attention.

Full Disclosure: 1. Roedy is an old friend, although we've never met in person. 2. I don't agree with him on this.

You might also look at Ben Kuipers "Why Don't I Take Military Funding?".

share|improve this answer
    
The CMP policy seems to have very much the same goals as mine. If I start receiving questions on why that clause is there in my license, I might refer them to read Roedy's explanation, since it pretty much sums up how I want my license to be interpreted. –  Tomas Lycken May 23 '13 at 11:53
add comment

I can't think of an example that has been tested in any court. The JSON license does state something that may be close to what you're looking for. Note that it's not considered open source because of that:

The Software shall be used for Good, not Evil.

There's nothing preventing you from adding your own statement to and MIT license, for example.

share|improve this answer
6  
So who gets to decide what counts as Good and what counts as Evil? –  FrustratedWithFormsDesigner May 22 '13 at 17:31
    
Yeah, I've understood since writing the question that "Open Source" by definition does not discriminate against field, so maybe it's not an "open source" license I'm looking for. However, I'd like to use an existing license, without modifying it, because I don't trust myself to formulate an appendix that actually makes legal sense - it's much better if someone who knows licensing has already done that. –  Tomas Lycken May 22 '13 at 17:32
4  
@FrustratedWithFormsDesigner - Google? –  mouviciel May 22 '13 at 17:50
4  
@mouviciel: Oh yeah, that will make me feel better. :/ –  FrustratedWithFormsDesigner May 22 '13 at 17:53
7  
Have you seen wonko.com/post/jsmin-isnt-welcome-on-google-code? Half-way down the page is an excerpt from a talk by Crockford detailing IBM's legal woes when trying to use software under the JSON license. (It's funny.) –  apsillers May 22 '13 at 18:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.