10 U.S.C. § 837 : US Code - Section 837: Art. 37. Unlawfully influencing action of court

      (a) No authority convening a general, special, or summary court-
    martial, nor any other commanding officer, may censure, reprimand,
    or admonish the court or any member, military judge, or counsel
    thereof, with respect to the findings or sentence adjudged by the
    court, or with respect to any other exercise of its or his
    functions in the conduct of the proceeding. No person subject to
    this chapter may attempt to coerce or, by any unauthorized means,
    influence the action of a court-martial or any other military
    tribunal or any member thereof, in reaching the findings or
    sentence in any case, or the action of any convening, approving, or
    reviewing authority with respect to his judicial acts. The
    foregoing provisions of the subsection shall not apply with respect
    to (1) general instructional or informational courses in military
    justice if such courses are designed solely for the purpose of
    instructing members of a command in the substantive and procedural
    aspects of courts-martial, or (2) to statements and instructions
    given in open court by the military judge, president of a special
    court-martial, or counsel.
      (b) In the preparation of an effectiveness, fitness, or
    efficiency report, or any other report or document used in whole or
    in part for the purpose of determining whether a member of the
    armed forces is qualified to be advanced, in grade, or in
    determining the assignment or transfer of a member of the armed
    forces or in determining whether a member of the armed forces
    should be retained on active duty, no person subject to this
    chapter may, in preparing any such report (1) consider or evaluate
    the performance of duty of any such member as a member of a court-
    martial, or (2) give a less favorable rating or evaluation of any
    member of the armed forces because of the zeal with which such
    member, as counsel, represented any accused before a court-martial.