I want to prevent military, policing, and surveillance companies from using my open source code in their projects, through a custom permissive license. Of course, I can't tell the military itself what it can and cannot do. So I think terms such as "this may NOT be used for military or surveillance applications" are pretty pointless.

Would I be better protected with a statement like "This code may be used for all projects, private and commercial, except when used for ______ purpose, in which case a one-time fee of 5,000,000 USD will be immediately due."?

My theory is that it outlines a path for such organizations to still use it, even if that path is so expensive no rational organization would take it, and acts as a good damages baseline should I ever have to take any such an organization to court.

edit: I'm not interested in money and would actually like to avoid mentioning it at all, I'm just trying to lay out the correct legalese to prevent such entities from using my work. If it's enough to define said entities and say "May NOT use this" I'm happy with that.

  • 4
    For the record, that would not generally be considered an open-source license.
    – cpast
    Nov 29, 2019 at 16:58
  • This question on opensource.stackexchange.com may be of interest. Nov 29, 2019 at 17:04
  • @cpast - yeah, the OSF definition stipulates I can't discriminate against certain other fields. I would still like to call it open source though, so long as it has no legal repercussions, I'd welcome the dialog it might open.
    – Anne Quinn
    Nov 30, 2019 at 17:27
  • @AnneQuinn I don’t think there would be any legal issue calling it “open source;” you might get criticism from others, but it sounds like you’re happy to have that dialogue.
    – cpast
    Nov 30, 2019 at 17:32

1 Answer 1


You cannot do this through any established public license that I know of, but you could write your own. The model would be any educational use or non-commercial use license, such as CC NC licenses. The main challenge is defining the excluded classes of usage. That is why you should engage an attorney to draft this for you.

I don't think there is any point in adding a $5M penalty clause. You offer a separate paid license for individuals who do not want to comply with the particular terms of your license, and set the fee to whatever you want. Saying that you're gonna fine violators is a bad idea because penalty clauses are illegal. Instead, the standard approach is a liquidated damages clause, where you state what a reasonable estimate of your damages would be. In the case of software that is available for purchase, illegal copying of the software obviously results at least in the cost of the software qua lost revenue as damages. Plus shipping and handling.

  • A liquidated damages clause is useless because someone who is violating copyright isn’t a party to the licence that contains the LDs. The same would be true of the penalty clause but, as you say, they are void anyway.
    – Dale M
    Nov 29, 2019 at 20:28
  • You can offer a license for free to anyone not doing X, and a license for $5,000,000 for anyone doing X. If someone uses the software without the appropriate license and does X, then you can kind of reasonably argue $5,000,000 in damages. If you sue them, and they continue to use the software without the appropriate license, then you have quite a strong argument. Of course there is no "penalty" involved, just a rather expensive license.
    – gnasher729
    Dec 1, 2019 at 19:33
  • Yup, two licenses for separate purposes rather that one with what looks like a penalty.
    – user6726
    Dec 1, 2019 at 19:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .