He's clearly a traitor. He probably did not do it for heroic reasons but heroism will be attributed to him.
I work for the US Government (but my job will be changing back to the commercial sector next week, so I feel comfortable revealing that, now). By a textbook definition, he is a traitor to the US government and he broke agreements he signed by revealing that. Legal prosecution can and should occur. There are ways to report what one views as illegal and unethical in the government. He did not take those avenues. He, instead, decided to reveal it to the public. I don't know much about his case but if he didn't try the real checks and balances measures before revealing it to the public, he's clearly a "fame" seeking bastard.
Some may complain, "but, but, if the system is corrupt, what good is reporting it?" That's true only if you think the system is completely and entirely corrupt with no hope of anything being done. That's absurdly pessimistic to the point as to render you dysfunctional as a social entity. The probability that you would receive backlash for reporting impropriety is stupid small especially since third parties often do the checks and balances on that unethical/illegal stuff. I have been part of 2 separate investigations and I can assure you: your shit goes to jail, no matter how high up the food chain you are, if you do something illegal or unethical (that has specific laws governing the ethics). I don't know about this case but the individuals that sanctioned and ordered the unethical/illegal wire-taping and records collection would be in trouble (more on this in a second).
As stupid as it sounds, you can even report this shit straight to the office of the president (Obama).
In this case...I digress. It is possible that nothing would have been done because it was government sanctioned. In which case, he may have been morally right to disclose this to the public. But it was morally wrong. If I were in his position and I knew of these things, I would have resigned and worked within the system to get it stopped. Mostly because I'm not a traitor.
edit - I'm all over the place with this and I typed stuff in a confusing manner. Someone please tear me a new a****** by finding fault in what I'm saying. Then I can better explain what I meant (assuming you didn't understand or think I said something wrong).