Disclosure of matters occurring before a grand jury, other than its deliberations and the vote of any juror, may be made to prosecuting attorneys for use in the performance of their duties. Otherwise a juror, attorney, witness, interpreter, stenographer, operator of a recording device, or any typist who transcribes recorded testimony may disclose matters occurring before the grand jury only if directed by the court preliminary to, or in connection with, a judicial proceeding or if permitted by the court at the request of a defendant upon a showing that grounds may exist for a motion to dismiss an indictment because of matters occurring before a grand jury. A grand juror cannot be questioned for anything that the grand juror may say or any vote that the grand juror may give in the grand jury proceedings relative to a matter legally pending before it, except for perjury of which the grand juror may have been guilty in making an accusation or giving testimony to his or her fellow jurors. No obligation of secrecy may be imposed upon any person except in accordance with this section. A court may direct that an indictment shall be kept secret until the defendant is in custody or has given bail. In that event the clerk shall seal the indictment, and no person may disclose the finding of the indictment unless necessary for the issuance and execution of a warrant or summons.
SDCL 23A-5-16