Does war have to be declared for one to be a traitor in the US?
"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."
It could be argued as a defense that unless we are formally at war we have no enemies as used in this section.