I was wondering the following: Suppose a programmer writes a program that has no license info but does something illegal, never runs the code but puts it to the Github. According to this: What are the "default rights" for the source code on the Internet without license shown? no one except the author can execute the code so the program has not done anything illegal. Has the programmer done anything illegal?
I do not think your question makes sense. To aid discussion, let me introduce a concrete example.
I think everyone knows that making death threats against the president of the united states is a federal offense.
- If you write a program that automates the process of sending death threats against the president, have you boken the law? I don't think so. IANAL
- If you post your code on github, have you broken the law? I doubt it. Can you license the code in any way you want? It's up to you.
- Are you obligated to tell others that it would probably be a criminal violation to execute the code? I doubt it, but it would be a nice thing to do.
- If you charge money for the program, do you have any obligations? No clue
I would contend that your program does not do anything illegal. It is the person who choses to run the program that would be doing something illegal.
But when I thought of my example, I was thinking everything is straight forward. The README clearly states it is a program for automating the sending of death threats, the code is straightforward, and when you run the program there is a button that says "Send 500 POTUS death threats".
But what if the program was marketed as generate AI kitten photos, code was obsfuscated, and the button said "Cute Kitten Photo"?