Is code on Github safe against US claims? I run a smaller non-US company producing hardware-related code. Since the code is hardware related I might patent it (the entire system) outside US at some time. I want to use Github to store my code because I believe it's better protected against hacking there as opposed to self-host the repository (ransomware). Could a counterparty file a case to a US court and ask the source code of my invention because the hosting company (Microsoft) is US-based? If that would happen, would I get informed? I ask this because defending in US would be much more expensive considered the high salary level there and the translation costs and eventually travel costs. The company is not planning to be active in the US.
There are a tangle of issues going on in this question. First, distribution of hardware-related code in commerce might very well void any right you have to patent the software and might bring it into the public domain for purposes of patent law. Publicly disclosed inventions, even if protected by copyright, are part of the &quot;prior art&quot; and can't be protected by patents. Second, you have to disclose the material ideas in an invention in order to patent it, in your patent application. The bargain of a patent is that you get protection for about two decades in exchange for contributing your idea to the public domain when it expires. Third, usually people protect software with copyright rather than patent, although there are pros and cons to each approach. Fourth, if someone knows enough about your invention to subpoena the place where you store it, you have probably disclosed too much information pre-application to patent it. Fifth, usually the &quot;real&quot; target of a subpoena gets notice of it and an opportunity to defend against the subpoena (e.g. for improperly disclosing a trade secret) before it is carried out, but the same does not apply, for example, to National Security Letters under the Patriot Act (which are supposed to be used only in national security investigations or counter-terrrorism operations, but might be abused). Certainly, an ordinary person can't issue a National Security Letter for private commercial gain without corrupt government assistance. Sixth, to issue a subpoena, there must be some pending case to which someone can claim the subpoena is relevant. A random person can't just subpoena information because they want to. Seventh, even if a server host isn't based in the United States, that doesn't mean that there isn't some means by which a court might assert subpoena power over information on server host. There are many legal &quot;hooks&quot; that could apply. Eighth, defending an isolated subpoena isn't terribly expensive. Typically, you'd be looking at a legal fee in the $1000 to $5,000 (U.S.) range, which is much, much less than the dollar cost of patenting an invention in any country. In short, while there are pros and cons of using a U.S. based server host, people in the IT industry routinely attach far too much importance to this fact which is only very rarely an important one legally. There are many other issues which are much more important in this fact pattern to your ultimate goal.
You can always get in trouble. Copyright is always protected by the laws of a particular nation, by the courts of that nation. Because of the Berne Convention and the Universal Copyright Convention, I can sue you outside of my country, and will be treated as a person of that country. The conventions don't say who has jurisdiction, that is where you have to sue, so you have to resort to conventional jurisdictional principles. If you are in Europe, under the Brussels Convention, that means I have to sue you in your country of domicile (if you reside in multiple European nations, I get to decide which country to sue you in). The English courts are slightly different in that they generally hold that you sue in the country where the act took place, but (Lucasfilm v Ainsworth) you can sue in UK courts for infringement that occurs in the US. As you can see, this can get complicated. I can't sue you in Mongolian courts (assuming neither of us has any connection at all to Mongolia), but I could sue you (being a hypothetical UK citizen) in UK courts if you did the infringing deed while in Mongolia. Mongolian courts enforce Mongolian copyright law, US courts enforce US copyright law. Therefore you first have to decide what country you plan to sue in (from the plaintiff's perspective).
You will want to speak with a patent attorney, not a labor attorney. Some of the facts you are presenting are entirely wrong. Patents have inventors, copyrights have authors. Inventorship has strict rules. Inventorship cannot be denied without consequence in almost any jurisdiction, but you'll need to get local legal advice. In the US, "A patent is invalid unless it lists the first and true inventor or inventors of the claimed invention." (See Stark v. Advanced Magnetics, 119 F.3d 1551, 1553, 1556 (Fed. Cir. 1997); 35 U.S.C. § 102(f) (“A person shall be entitled to a patent unless . . . he did not himself invent the subject matter sought to be patented). See also 35 U.S.C. §§ 111, 115-16, 256.) Assignment--the "ownership" of the patent--is different. It's very common to have you sign an agreement as a condition of your employment that you grant full assignment to your company for any patentable material created under their employ. If you did not, it is possible that the company would need to give you consideration for the right to assignment, e.g., they would have to pay you something to own the patent. If you are no longer there, that "something" can be substantial, because the patent is invalid without it, and they have little leverage over you. Bring all written records, emails, etc. to a licensed attorney who specializes in patent litigation.
There is something called the exhaustion doctrine that says that once the holder of a patent sells a patented device, they have relinquished control over that particular instance of the patent implementation. Anyone who legally purchases this hardware has the right to run whatever software they want on it, as long the software is otherwise legal (software designed to defeat DRM would be an example of software that is is not legal).
If your own software includes software covered by the GPLv2 (for example by copying source code, or by linking dynamically) then your own software is also covered by the GPLv2, and you will have to provide the source code. This is called a "work based on the Program" on the GPLv2. In this case, however, it seems that your own software does not include software covered by the GPLv2, but you want to put it onto an SD card together with software covered by the GPLv2. That would most likely fall under "mere aggregation of another work", as long as your software and the other software do not interact very closely (such as dynamic linking). To quote the GPLv2: In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. So in that case the GPLv2 does not cover your program. You will still have to supply the source code for the GPLv2 software on the SD card. This is covered by section 3 of the GPLv2. Basically, you have two options: send along the complete source code for all the software (would be quite bothersome for a complete distro) or provide a written offer to provide the source code on demand to anyone who asks (you may charge for this, but only to cover your cost) GPLv2 contains a third option, but that only applies to non-commercial distribution. Practically speaking, it should be enough to include a README.txt or similar explaining that the SD card contains software covered by GPLv2, and that you will provide the source code on demand for a certain, reasonable fee (say $5 or $10 per CD). In practice, it is unlikely that anyone would ask for this, as the source code can usually be downloaded for free elsewhere, but if someone does ask, you just charge them $5 and send a CD. Of course, to reduce legal risks it may be prudent to contact a lawyer for your jurisdiction, as this is only general advice.
In Canada, no: linking does not reproduce any part of the original. In Sweden, Spain and according to the EU, no: communicating a link does not communicate anew the work to the public. In the US, it isn't as clear, but generally, linking is not per se infringement, usually because no copying happens.
You can't patent an algorithm, but I'll assume you are talking about the case where you have patented a machine or process that uses an algorithm, but that adds significantly more, and that the software being distributed implements much of this process. Courts might find an implied licence or promissory estoppel when distributing software under an open source licence that doesn't explicitly exclude patent licencing as part of its terms. It would be prudent to state your patent rights and explicitly exclude a patent licence if you intend to enforce your patent rights. As an example, this software implicates a patent , so they allow "permission to use, copy, modify, and distribute this software and its documentation for educational, research, and non-commercial" purposes. Users that want to use the software commercially need to contact the authors who also happen to be the patent owners, and I assume would negotiate a patent licence at that point.
I've answered this in the context of US patent law, but similar principles apply elsewhere in the world. As stated in 35 USC 271, "whoever without authority makes, uses, offers to sell, or sells any patented invention, within the United States or imports into the United States any patented invention during the term of the patent therefor, infringes the patent". Thus, a patent provides the patent owner with the right to exclude others from performing these actions, and the right to sue anyone who does perform these actions (both to stop them from infringing the patent, and to collect monetary damages for their infringement). Creating an infringing product and then licensing it under the GPL (or any other scheme) does not change the fact that it infringes a patent. 35 USC 271 also states that "Whoever actively induces infringement of a patent shall be liable as an infringer". This means that, even if the creator of the infringing product does not perform any infringing acts in the US, the act of offering it for free use could be construed as induced infringement of the patent, and they could still be sued for that infringement.