Yahoo has previously unsuccessfully sued the foreign intelligence surveillance (Fisa) court, which provides the legal framework for NSA surveillance. In 2007 it asked to be allowed to publish details of requests it receives from the spy agency. "When you lose and you don't comply, it's treason," said Mayer. "We think it make more sense to work within the system," she said.
Yahoo CEO Mayer: we faced jail if we revealed NSA surveillance secrets
Mark Zuckerberg joins Mayer in hitting back at critics of tech companies, saying US government did 'bad job' of balancing people's privacy and duty to protect
Dominic Rushe in San Francisco, The Guardian, 11 September 2013
No, Ms. Mayer, it is not treason.
United States Constitution, Article III, Section 3
Treason against the United States, shall consist only in levying War against them, or in adhering to their Enemies, giving them Aid and Comfort.
It might be contempt of court or the like, given that you would be violating a court order regarding a warrant (although it is a "general warrant" and therefore an illegitimate one). Or you would be violating a court order regarding a National Security Letter (that is not a valid warrant or subpoena and therefore is illegitimate as well). But were you to tell we the people what you provide to the National Security Agency or other government entities, you would assuredly
not be warring against the USA nor giving assistance to its enemies (who have not even been officially declared).
There is no "state secrets act" in the USA. People not in the employ of and not under business contract with the government do not have any official obligation to keep government information secret.
Relatedly, the President is not the Commander in Chief of the country, only of the armed forces. Pres. Obama could show up at your door and order you to drop and give him twenty, and you would be more than within your rights to tell him to take a hike, because he has no official power whatsoever to compel you to do it.
Those who give the public information about illegal and abusive government acts are aiding the public, not the enemy. This is the hideously pernicious part of the military court martial conviction of Chelsea Manning on espionage charges. She was acquitted of the "aiding the enemy" charge. How can it be espionage if she didn't aid the enemy?
Only if the enemy is us (and not in the Pogo sense). And that cannot stand.
Amendment 1
Congress shall make no law respecting [...] abridging the freedom of speech [...].
Amendment 4
The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized.