The giving of testimony, whether by an accused or by another witness, does not operate as a waiver of the privilege against self-incrimination when examined with respect to matters which relate only to credibility.
an adverse party is entitled to have the writing produced at the hearing, to inspect it, to cross-examine the witness thereon, and to introduce in evidence those portions which relate to the testimony of the witness. If it is claimed that the writing contains privileged information or matters not related to the subject matter of the testimony, the military judge shall examine the writing in camera, excise any privileged information or portions not so related, and order delivery of the remainder to the party entitled thereto. Any portion withheld over objections shall be attached to the record of trial as an appellate exhibit. If a writing is not produced or delivered pursuant to order under this subdivision, the military judge shall make any order justice requires, except that when the prosecution elects not to comply, the order shall be one striking the testimony or, if in discretion of the military judge it is determined that the interests of justice so required, declaring a mistrial. This subdivision does not preclude disclosure of information required to be disclosed under other provisions of these rules or this Chapter.
N.Y. Comp. Codes R. & Regs. Tit. 9 § 517.6