PETA has “spies” who get jobs at companies that might be engaging in animal abuse so that they may document the company’s behavior. On the face of it, this seems to put the employee/spy in a potentially illegal position, as most companies will require the employee to sign restrictive NDAs that would need to be breached to make the intended disclosures. However, I would think that any disclosures of illegal behavior would be protected by whistleblower laws–this may or may not be enough for the employee to keep the job (which is a moot point) but should excuse any breach of an NDA.
I’m not sure I agree with the commentators who call the spies illegal/unethical. Every employee has private agendas, not all of them disclosed to the employer. I do think the “spy” has to perform the job that he/she was hired to do, but if this is done, then I think it’s perfectly legitimate for the person to have a second agenda.