Any person subject to this code shall be punished at the direction of a commanding officer if such person:
(a) Aids, or attempts to aid the enemy with arms, ammunition, supplies, money or other things; or
(b) without proper authority, knowingly harbors or protects or gives intelligence to, or communicates or corresponds with or holds any intercourse with the enemy, either directly or indirectly.