I don't think we've executed a traitor since the Rosenbergs (and that was over 50 yrs ago).
That was the American thing to do.
IMHO they were executed as spies, not traitors (though they were, of course). Treason too hard to prove, don't know how long it has been since we executed someone for that.