26

The project in which work is private for commercial purposes and not its source code is distributed to anyone. Only the functional application shown consumers through a website.

It has the following structure:

  • The source code is written in PHP, the only part where third-party code is used when using Composer and PHPUnit.
  • HTML, CSS, Javascript technologies are used (with free third-party libraries)
  • Server-side MySQL server, PHP, and Memcached is used.
  • And the server is not a shared hosting, is a VPS.

We do not want anyone to see our source code, but if for any reason our code is stolen or otherwise obtained, we want to have a license that does not allow disclosure of any kind.

My questions are:

Is this type of project with third-party code and private code compatible?

Is it possible to license these works?

Dan Pichelman
  • 13,773
  • 8
  • 42
  • 73
Jhonjhon_123
  • 393
  • 1
  • 3
  • 4
  • 1
    This looks like it was written in another language and converted to English using a translator program. There are a number of words here that don't make sense; what does "filtered" mean? Are you trying to somehow hide the HTML, CSS and Javascript? You can't. – Robert Harvey Mar 07 '16 at 16:30
  • 1
    Possibly a duplicate of [what is the "default" software license](http://programmers.stackexchange.com/questions/26548/what-is-the-default-software-license). That said, *you* need to check out the nature of the distribution you intend to do and the licensing of your third party libraries. Free doesn't mean the same thing for all libraries (GPL and BSD are both free - but have different requirements). –  Mar 07 '16 at 16:31
  • 1
    @RobertHarvey, "filtered" mean "It is stolen, or obtained by any reason" – Jhonjhon_123 Mar 07 '16 at 16:32
  • Well, the only thing that might be stolen is the HTML, CSS and Javascript. Is any of that especially sensitive? Move the sensitive parts into the PHP. Stolen Javascript is sort of the price you pay for having something on the Internet. – Robert Harvey Mar 07 '16 at 16:37
  • @RobertHarvey We want to license the code PHP, of course HTML, CSS, JS code, are always visible and we have no problem with it, but, in one example, someone steals our server code, or under our authorization we give our code to someone, we want to have licenses non disclosure. – Jhonjhon_123 Mar 07 '16 at 16:45
  • 1
    Be sure to carefully check the terms of the licenses for all the 3rd party libraries you're using. Some terms may cause you problems. – Dan Pichelman Mar 07 '16 at 16:46
  • Source code that is develop in house should be protected in the same manner that other *Intellectual Property* is protected. – Jay Elston Mar 10 '16 at 19:23
  • Be careful about where your code is stored. For instance, any code that you post to stackexchange has a license which they specify. The assumption is that you are posting to a public forum so anything you post will be in the public domain, legally "https://stackoverflow.com/legal/terms-of-service#licensing". – Robert Lugg May 29 '23 at 19:51

2 Answers2

25

The simple answer is "don't license your code." Instead, place a copyright statement on your code (which you should have done anyway) and add a statement to the effect that no one is allowed to use your code.


Here's the longer answer:

We do not want anyone to see our source code, but if for any reason our code is stolen or otherwise obtained, we want to have a license that does not allow disclosure of any kind.

If someone steals your code, they're not terribly interested in how you may have licensed that code. They wanted it and stole it, there's nothing a license will do to prevent them from using it as they please based upon the fact that they stole your code.

More broadly, a license is there to give permission to others in order to use code that you created. The license dictates the terms that others have to follow, and specifies how they may use your code.

As you don't want anyone using your code then you shouldn't put a license on it.

  • Ah yes, but those who stole it may hand it off to other people who may first assume that the thieves obtained it legally and who may, upon seeing the license, contact the original copyright holder? Having just the copyright in the code wouldn't do anything to raise alarm bells. Of course the thieves can take it out, but most thieves aren't very sophisticated and if you bury a notice in every source file... – Marjan Venema Mar 08 '16 at 10:26
  • 3
    Ok - but I'm getting a warning in my package.json file, lol. – jscul May 02 '20 at 07:32
  • 11
    @jscul For a package.json file, you can set `"license": "UNLICENSED"` and additionally `"private": true` to prevent accidental publication, as per [the docs](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#license) – Magnus Bull Mar 01 '21 at 09:23
2

The "default" license for source code with no specific license stated is standard copyright, which means nobody but the owner is allowed to copy and distribute the code. You automatically have copyright on anything you write - a copyright notice is merely informative, it does not grant you any right beyond what you have by default.

Of course if people steal your code you cannot prevent them from distributing it. Sure it would be illegal, but so is stealing it in the first place. The PHP-code you can protect by simply keeping it secret, but there is no way you can protect the CSS, HTML and JavaScript.

But unless your code contains passwords or valuable trade secrets, nobody is going to bother to steal or copy it, so don't worry.

JacquesB
  • 57,310
  • 21
  • 127
  • 176
  • 1
    Careful: This is true in a lot of countries, but might not be in others. A license text ensures the rights are clearly stated and the user is informed. – Darkhogg Mar 07 '16 at 17:05
  • @Darkhogg Exactly, in the current project, we are required to license all files, what kind of license or notice is right place? – Jhonjhon_123 Mar 07 '16 at 17:07
  • 1
    @Jhonjhon_123: If you don't intend to allow others to use your files, the best 'license' to use is "all rights reserved". This is also the default copyright license if you don't state it explicitly. – Bart van Ingen Schenau Mar 08 '16 at 08:43