Even among those who oppose the government spying programs Edward Snowden revealed, many are calling for his prosecution. The refrain they sound has become familiar in the WikiLeaks era: no matter how good their intentions, those who leak classified information violate the law and put the nation at risk. Their transgression must be punished if we are to preserve the rule of law.

It is premature to judge Snowden’s actions, as information about them continues to unfold. But it is not too soon to push back against the simplistic formula that every leaker is a traitor – or, for that matter, a hero.

Disclosures of classified information come in all different forms. On one end of the spectrum, there are acts of espionage designed to harm the country by providing highly sensitive information to an enemy. On the other end, there are revelations of government wrongdoing by patriotic public servants who carefully avoid any disclosure of truly sensitive information. And there is everything in between: “authorized” leaks to bolster an administration’s standing; negligent leaks by inadequately trained personnel; self-serving leaks by employees seeking attention or status; and more.

Our laws are poorly designed to deal with this complex reality. The Obama administration’s weapon of choice in its crusade against national security leaks has been the World War I-era Espionage Act. That statute, which criminalizes certain disclosures of “national defense information,” was enacted to address traitors and spies. Its penalties are harsh, and until this administration, it was rarely used to prosecute well-intentioned disclosures to the media. But the statute does not explicitly require the government to prove malicious intent, and so it has been pressed into service against Daniel Ellsberg as well as Aldrich Ames.

Additionally, there is a patchwork of statutes that permit prosecution for disclosure of classified information under a smattering of circumstances. For instance, one law penalizes theft of government property; another bars federal employees from keeping classified documents at unauthorized locations; another bars the disclosure of classified codes. Some carry penalties that seem more fitting for disclosures that are rooted in negligence or poor judgment. Obama’s Justice Department, however, has generally treated them simply as “add-ons” to Espionage Act charges.

On the other side of the balance, there is the legal framework built to protect and encourage “whistleblowing”: disclosures that are reasonably believed to reveal government fraud, waste, or illegality. The centerpiece of this framework is the Whistleblower Protection Act, which prohibits government agencies from taking adverse “personnel actions” against whistleblowers. However, the Act excludes intelligence community employees, and it does not provide any whistleblower with a defense against criminal prosecution.

The absence of any “whistleblower defense” to the Espionage Act and other anti-leak laws would make some sense if the government did a better job of identifying truly sensitive information. Courts tend to treat classification as a reliable proxy for sensitivity. In fact, it is widely acknowledged that “overclassification” is rampant in the federal government, with officials estimating that anywhere from 50 to 90 percent of classified documents could safely be released. Indeed, some documents are classified for the very purpose of hiding government misconduct.

Even officials who readily acknowledge the problem of overclassification usually resist the notion of extending legal protections to national security whistleblowers who go public. Individuals, they contend, cannot be deputized to decide unilaterally whether to respect the document’s designation. The argument is a strong one. The would-be leaker might not be in a position to appreciate the full security consequences of disclosure, or might simply exercise bad judgment.

But permitting the prosecution of national security whistleblowers in the current environment of overclassification is equally problematic. Imagine the predicament of an employee who comes across evidence of gross governmental misconduct that has been improperly classified, and who raises her concerns within approved government channels to no avail. If she discloses the information, she may be prosecuted as a traitor; if she remains silent, she becomes complicit in the government’s own violation of the law and the public trust.

It is clear that we need a more nuanced and far-reaching solution. We need fundamental reform of the classification system, so that leaks are no longer the only way to provide the public with information it has a right to know. We need the government to exercise better discretion when it chooses whether and how to prosecute leaks. And we need laws and policies that narrowly and carefully protect national security whistleblowers – including those who are forced to go public – without turning the information security system into a free-for-all.

The question of how to protect national security while preserving the transparency that is necessary for self-government is a complicated problem. The simplistic responses to Edward Snowden will not bring us any closer to the solution.

Elizabeth Goitein is the co-director of the Liberty and National Security program at the Brennan Center for Justice at New York University School of Law. The views expressed are solely her own.