As an employee, you should never be forced to choose between doing something illegal or losing your job. You also shouldn't be punished for reporting an illegal activity or for following state or federal law. This is the theory behind the public policy exception to the general rule that an employer can fire an at-will employee for any reason or for no reason at all. Under the public policy exception, an employer cannot fire an at-will employee for acting in the public interest. This is a very difficult question, and the answer varies from court to court.
Courts usually define public interest very narrowly.
Most courts have held that the employee must be acting in accordance with a federal or state law to be acting in the public interest. In addition, if an employer is violating the law, he or she cannot fire an employee for refusing to go along with the violation or for reporting the company's violation. Reporting or challenging an employer's activity that is of only private interest is generally not protected by public policy. For example, suppose you find out your supervisor is under investigation for embezzling money from his former employer. You report that information to executives in your company, and the company fires you.