I have a home project, which is not open-source. To save time I'd like to use that source code for company project. How can I protect myself against the claim that I stole company source code? It is unlikely I will get permission to use my source code beforehand, but there's also no restriction on using open-source software with permissive licenses such as MIT.
Disclaimer: the following is a personal opinion and not legal advice. For legal advice, you should consult a lawyer or a qualified legal expert.
This matter depends on the country you're working on, as well as terms of your work contract:
- In many countries, intellectual property and ownership of code crafted at work goes to the employer.
- When the law doesn't ensure this , there are chances that the terms of your work contract might do so.
With such conditions, use of your home made code in your work projects, would put you in an unfavorable and risky position:
the basic assumption would be that owner of the code would be the company, unless you can prove pre-existing intellectual property, and that you didn't use working time to improve your home project. And that's usually pretty hard.
Of course, if your home project would be a public open source project, you could use it under the terms of OSS licenses such as MIT. In this case, preexisting rights could be demonstrated, by downloading it from your project's site. The source code repository maintained at an independent third party (github ? sourceforge ? etc.) could help to demonstrate that this code existed before your current work assignment and that you could'nt have the opportunity to tamper with file dates. Nevertheless, in case of conflict with your employer, your employer might claim that you used your working time to improve your home project, and raise suspicion on your loyalty.
I therefore think, that the best way to handle this would be to reach an agreement with your employer (and get it in writing):
- The MIT terms that you consider seem rather flexible for your employer and wouldn't be rejected.
- An agreement would also document for the hierarchy your loyalty to the company (i.e. you are searching creative ways to achieve objectives in a cost-efficient manner). This should have rather positive effects on your career.
- Both your employer and yourself will be protected. No risk that your good will could be misunderstood or used against you in a later stage.
I think that given the constraints you set up in your question, you really can't protect yourself.
If you don't open-source your code using a license your company will accept, and you can't get your company to license your code using an agreement between yourself and the company, then you can't use the code for your company work.
My suggestion would be to go ahead and ask your company whether it will agree to license your code. You say it's unlikely they'll agree, but I really don't see any way around it.