Section 39L. The commonwealth and every county, city, town, district, board, commission or other public body which, as the awarding authority, requests proposals, bids or sub-bids for any work in the construction, reconstruction, alteration, remodeling, repair or demolition of any public building or other public works (1) shall not enter into a contract for the work with, and shall not approve as a subcontractor furnishing labor and materials for a part of the work, a foreign corporation which has not filed with the awarding authority a certificate of the state secretary stating that the corporation has complied with requirements of section 15.03 of subdivision A of Part 15 of chapter 156D and the date of compliance, and further has filed all annual reports required by section 16.22 of subdivision B of Part 16 of said chapter 156D, and (2) shall report to the state secretary and to the department of corporations and taxation any foreign corporation performing work under such contract or subcontract, and any person, other than a corporation, performing work under such contract or subcontract, and residing or having a principal place of business outside the commonwealth.