While we have rarely used it in recent times it is still in our law books.
To avoid the abuses of the English law (including executions by Henry VIII of those who criticized his repeated marriages), treason was specifically defined in the United States Constitution, the only crime so defined. Article III Section 3 delineates treason as follows:
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.
The Congress shall have Power to declare the Punishment of Treason, but no Attainder of Treason shall work Corruption of Blood, or Forfeiture except during the Life of the Person attainted.
However, Congress has, at times, passed statutes creating related offenses which undermine the government or the national security, (such as sedition in the 1798 Alien and Sedition Acts, or espionage and sedition in the 1917 Espionage Act) which do not require the testimony of two witnesses and have a much broader definition than Article Three treason. For example, some well-known spies have been convicted of espionage rather than treason.
The Constitution does not itself create the offense; it only restricts the definition. The crime is prohibited by legislation passed by Congress. Therefore the United States Code at 18 U.S.C. § 2381 states "whoever, owing allegiance to the United States, levies war against them or adheres to their enemies, giving them aid and comfort within the United States or elsewhere, is guilty of treason and shall suffer death, or shall be imprisoned not less than five years and fined under this title but not less than $10,000; and shall be incapable of holding any office under the United States." The requirement of testimony of two witnesses was inherited from the British Treason Act 1695.
In the history of the United States there have been fewer than 40 federal prosecutions for treason and even fewer convictions. Several men were convicted of treason in connection with the 1794 Whiskey Rebellion but were pardoned by President George Washington. One of American history's most notorious traitors, in which his name is considered synonomous with the definition of traitor, is Benedict Arnold. The most famous treason trial, that of Aaron Burr in 1807 (See Burr conspiracy), resulted in acquittal. Politically motivated attempts to convict opponents of the Jeffersonian Embargo Acts and the Fugitive Slave Law of 1850 all failed. Most states have provisions in their constitutions or statutes similar to those in the U.S. Constitution. There have been only two successful prosecutions for treason on the state level, that of Thomas Dorr in Rhode Island and that of John Brown in Virginia.
After the American Civil War, no person involved with the Confederate States of America was tried for treason, though a number of leading Confederates (including Jefferson Davis and Robert E. Lee) were indicted. Those who had been indicted received a blanket amnesty issued by President Andrew Johnson as he left office in 1869.
Several people generally thought of as traitors in the United States, including Jonathan Pollard, the Walker Family, Robert Soblen, and Julius and Ethel Rosenberg, were not prosecuted for treason, but rather for espionage. John Walker Lindh, an American citizen who fought for the Taliban against the U.S.-supported Northern Alliance, was convicted of conspiracy to murder U.S. nationals rather than treason.
The Cold War saw frequent associations between treason and support for (or insufficient hostility toward) Communist-backed causes. The most memorable of these came from Senator Joseph McCarthy, who characterized the Franklin Delano Roosevelt and Harry Truman administrations as "twenty years of treason." McCarthy also investigated various government agencies for Soviet spy rings; however, he acted as a political fact-finder rather than criminal prosecutor. Despite such rhetoric, the Cold War period saw few prosecutions for treason.
On October 11, 2006, a federal grand jury issued the first indictment for treason against the United States since 1952, charging Adam Yahiye Gadahn for videos in which he spoke supportively of al-Qaeda.
http://en.wikipedia.org/wiki/Treason#United_StatesEspionage
The risks of espionage vary. A spy breaking the host country's laws may be deported, imprisoned, or even executed. A spy breaking his/her own country's laws can be imprisoned for espionage or/and treason, or even executed, as the Rosenbergs were. For example, when Aldrich Ames handed a stack of dossiers of CIA agents in the Eastern Bloc to his KGB-officer "handler," the KGB "rolled up" several networks, and at least ten people were secretly shot. When Ames was arrested by the FBI, he faced life in prison; his contact, who had diplomatic immunity, was declared persona non grata and taken to the airport. Ames's wife was threatened with life imprisonment if her husband did not cooperate; he did, and she was given a five-year sentence. Hugh Francis Redmond, a CIA officer in China, spent nineteen years in a Chinese prison for espionage—and died there—as he was operating without diplomatic cover and immunity.
http://en.wikipedia.org/wiki/Espionage#Risks