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 chapter and does not immediately notify the trustees or the inspector or resident engineer upon the project of the violation, is guilty of a felony.