Any subcontractor or agent or employee of any contractor or subcontractor, who has knowledge of any work being done in violation of any contract under this part and does not immediately notify the department or the inspector or resident engineer upon the project of the violation, is guilty of a felony.