About a year ago, I started working for a company (I'll call them Company A) and helped develop a web application for them. Eventually, my manager asked me to make changes to the application for another company, Company B, who was using the code I helped develop. I didn't find out until some time later that Company B did not have a relationship with Company A, although I continued to help Company B after finding this out. My manager also told me that he was looking to leave Company A and join Company B, and bring me along with him. At first, I didn't have a problem with this, but lately I've been thinking about it and wondering if working on Company A's code for Company B is the right thing. I checked my company's employee manual about intellectual property theft for software and it looks like what I did might get me and my manager in trouble. I've also been concerned by the suspicious nature of my manager (for example, asking me not to store information about Company B on my laptop, and asking me to put Company B's code in a separate directory on Company A's server in case it needed to be deleted).
I'm asking if I should report this to my company. I'm worried about doing so because a) I don't want to get my manager in trouble unless I'm sure what he's doing is a violation of our company's rules, and b) I'm afraid if I report this and my complicity in this that I would lose my job or, worse, face legal action.
I spoke to Company A's President/COO and told him what was going on. He said he would discuss the matter with some people at the company, including someone from the legal department. He also told me my job should be OK because I came forward on this myself. We'll see how everything goes.
By the way, one thing I didn't mention was that in order to give Company B the code, my manager had to clone one of Company A's servers with the code on it. So whatever information was on that server (files, login accounts, the application database, etc.) was potentially given to Company B, so it may be a lot worse than just sharing code.