No licence means all rights reserved: public code is not free code
A public repository without a licence file grants no right to use or modify the code. Why that is, and what to do when you meet one.
A common mistake is to assume that code published on the internet is free to use. The opposite is true: without a licence, the author's exclusive rights remain in place and nobody may copy, modify or distribute the work.
The choosealicense guidance on unlicensed code is explicit. Publishing in a public GitHub repository lets others view and fork the code under GitHub's own terms of service, but that is not permission to use, modify or share it for any purpose. Once a project has several contributors, each holds the rights to their own contribution.
If your team finds useful code without a licence, there are three routes:
- Ask the maintainers to add a licence. Often it was simply forgotten.
- Do not use it, and find an alternative with a clear licence.
- Negotiate a private licence, which usually means a contract and legal advice.
The same rule applies to what you publish. If you want others to use your code, choose a licence explicitly. If you deliberately grant nothing, say so in the README, so nobody assumes you forgot.
Agents add a twist: an agent that writes code may reproduce snippets from sources with their own terms. Treat generated code like any other dependency, and review and scan it before it ships.
This is general information, not legal advice.
Sources: choosealicense.com: No License, choosealicense.com: Licenses