Prosecutors in the US can't validly charge treason in all but the most extremely rare circumstances, though.
"Treason against the United States, shall consist only in levying War against them, or in adhering to their Enemies, giving them Aid and Comfort. No Person shall be convicted of Treason unless on the Testimony of two Witnesses to the same overt Act, or on Confession in open Court."
(This comes straight from the Constitution, hence the weird capitalization and punctuation.)
The Supreme Court has clarified the definition above, and indeed, it can't apply where no actual assemblage of force against the US was being prepared or used by either the defendant or the enemy to which one is being accused of adhering and giving aid or comfort. Maayyybe the Supreme Court will extend this to cyberwarfare, but that's hard to predict and they certainly haven't yet.
Anyway, regardless, the two-witness requirement for every single overt act involved is a very high bar.