Said section 5N of said chapter 12, as so appearing, is hereby further amended by striking out paragraph (8) and inserting in place thereof the following paragraph:-
(8) Any documentary material or other information produced by a person pursuant to sections 5B to 5O, inclusive, shall not, unless otherwise ordered by a justice of the superior court for good cause shown, be disclosed to any other person other than the authorized agent or representative of the attorney general and any officer or employee of the commonwealth who is working under their direct supervision with respect to the false claims law investigation, unless with the consent of the person producing the same, except that any information obtained by the attorney general under this section may be shared with any qui tam relator if the attorney general determines it is necessary as part of a false claims act investigation. Such documentary material or information may be disclosed by the attorney general in court proceedings or in papers filed in court. Nothing in this section shall preclude the attorney general from disclosing information and evidence secured pursuant to said sections 5B to 5O, inclusive, to officials of the United States, other states, the commonwealth or any political subdivision thereof charged with the responsibility for enforcement of federal, state or local laws respecting fraud or false claims upon federal, state or local governments. Prior to any such disclosure, the attorney general shall obtain a written agreement from such officials to abide by the restrictions of this section.