Compelled disclosure is in the air.

A federal judge has ordered Glenn Beck to disclose the names of confidential sources he used in his reporting that a Saudi Arabian man was involved in the Boston Marathon bombing. The man sued Beck for defamation after he was cleared of any involvement.

Journalist and filmmaker Mark Boal, who wrote and produced The Hurt Locker and Zero Dark Thirty, has asked a judge to block a subpoena threatened by military prosecutors who want to obtain his confidential or unpublished interviews with US Army Sgt. Bowe Bergdahl, accused of being a deserter.

A state judge has ruled that a New York Times reporter must testify at a murder trial about her jailhouse interview with the man accused of killing Anjelica Castillo, the toddler once known as Baby Hope. The judge said the interview included the only statements the man made about the crime other than those in his police confession.

If my inbox is any indication, those cases have prompted a surge of interest in shield laws and the practice of compelled disclosure. What is a shield law, exactly? When can a government official require a reporter to disclose sources or information? Who counts as a journalist under a shield law? What types of sources or information are protected? Is there a big difference between a subpoena and a search warrant?

Those are the questions I’ve been asked most often in this area, as a First Amendment lawyer and scholar, and this post will try to answer them. (Please keep in mind that I’m a lawyer, not your lawyer, and these comments shouldn’t be construed as legal advice.)

Sign up for weekly emails from the United States Project

Why a reporter’s privilege exists (sometimes)

Generally, any person who is asked or ordered to testify at a legal proceeding, or to produce documents relevant to one, is required to comply. If the person doesn’t, she’s subject to a contempt finding, which means a judge could put the person in jail, or fine her, or both. The penalty’s chief purpose is not to punish—it’s to extract compliance.

However, there are exceptions called privileges. The most famous is the attorney-client privilege that exempts an attorney from testifying against a client about confidential communications. Many states recognize similar privileges for medical doctors, therapists, religious advisors, and spouses. They all stem from the belief that there’s a public interest that justifies the exclusion of testimony by certain people against others.

For example, the attorney-client privilege recognizes that clients need good advice, and they can get it only if the client is honest with the attorney. The client might not be honest if she thought her attorney could be called to testify against her. So rules developed that exempt attorneys from testifying against clients in most circumstances.

Journalists have argued that they should have a privilege for roughly analogous reasons. They rely on sources to provide the news they publish, and those sources might not share sensitive or critical information in the absence of anonymity—out of fear that they’ll be punished for sharing it. So privileges developed protecting journalists, because there’s a public interest in encouraging the disclosure of newsworthy information.

Moreover, the credibility of the press depends upon its actual and perceived independence. If journalists are, or are seen as, investigative arms of the government or private interests, then the public might lose faith in their reporting and be loath to trust them with information.

Where does a journalist’s privilege come from?

So that’s the theory. What’s the actual legal source for a journalist’s privilege? Here’s where it gets complicated…

The First Amendment. The US Supreme Court ruled in 1972, in the landmark case Branzburg v. Hayes, that the First Amendment doesn’t allow a journalist who has witnessed criminal activity to refuse to testify about it before a grand jury. However, the court’s opinion was joined by five justices, one of whom wrote separately to say there could be future cases in which it would make sense for a journalist to be privileged.* Because that was the vote needed to decide the case, some lower courts have invoked the separate opinion to recognize a First Amendment privilege. Courts have been more hostile to it recently.

Federal shield statute. Nope. There is no federal shield law, despite many attempts by the Society of Professional Journalists and others to get one passed.

State constitutions and common law. In some places, journalists can claim a privilege based on the state constitution, and in other places, journalists can claim one based on state common law. For example, the New York Court of Appeals ruled in 1988 that the state constitution includes a privilege for journalists’ confidential and non-confidential materials, while the Supreme Court of Washington ruled in 1982 that case law allows journalists there to claim a privilege in civil suits.

State statutes. Roughly 30 states have passed statutes, called shield laws, allowing journalists to refuse to disclose or testify about confidential or unpublished information, including the identity of sources. The statutes vary significantly from state to state in the scope of their protections.

State and federal procedural rules. Regardless of whether a privilege exists, sometimes it’s possible under procedural rules to quash an order to disclose information. For example, rules of civil procedure can impose restrictions on subpoenaing a witness who resides, say, more than 150 miles from where a suit is pending. Rules of evidence might apply, too. They often prohibit duplicative testimony, so if other witnesses testify to the same facts, a journalist could argue that her testimony is duplicative. And courts can create their own rules. For example, after the New Mexico shield law was invalidated, the state supreme court enacted a rule giving journalists a privilege in state courts.

Who’s privileged, what’s privileged, and when privilege doesn’t apply

Whatever their source, privileges vary from state to state. That means it’s critical to evaluate a number of issues to determine whether a shield will protect a journalist in a particular case and place.

The first question: Who’s a journalist? That might be a tired debate in some circles, but when it comes to journalist’s privilege, it’s a question that has to be answered. Some privilege schemes are narrow and apply only to full-time employees of professional news outlets, while others are broad and extend to bloggers, filmmakers, freelancers, book authors, and student journalists. In other words, some are inclusive and others are exclusive. The problem here, of course, is that innovations in technology have complicated the endeavor of defining journalists and journalism.

Second, what kind of information is covered by the privilege? Some protect only a confidential source’s identity. Some protect a journalist’s unpublished notes or materials, regardless of their confidential or non-confidential status. Some protect any information obtained in the pursuit of news. And others protect all information obtained under an explicit promise of confidentiality. The scope of coverage varies widely.

Third, many privileges are subject to exceptions and/or balancing tests, and they affect whether or how a judge will apply a privilege on specific facts. National-defense exceptions, for example, can allow a prosecutor to overcome a privilege if national security is implicated by the case in which the journalist’s information is sought. Balancing tests, on the other hand, typically require a judge to consider the importance of the information to the case (importance favors disclosure), whether the information is available from other sources (availability disfavors disclosure), and whether the case is civil or criminal (criminal favors disclosure).

What about search warrants?

In 1978, in Zurcher v. Stanford Daily, the US Supreme Court ruled that journalists are subject to search warrants just like any other citizen, and thus the First Amendment grants them no special protection from properly executed warrants. In that case, a city police department used a warrant to search the newsroom of The Stanford Daily, a student paper at Stanford University. The police were looking for pictures of a violent confrontation between police and protestors, to identify the assailants.

Two years later, Congress passed the Privacy Protection Act, a federal law limiting the authority of law enforcement officials to search for, or seize, a journalist’s documentary materials and/or work product. The law requires the officials to obtain a subpoena rather than a search warrant. That’s a significant difference because a search warrant is challenged after its execution and after officials have seized the materials sought, whereas a subpoena is challenged in advance.

There are, however, some exceptions. A search warrant may be used against a journalist in basically four situations: (1) there’s probable cause to believe a journalist committed a crime, defined here as an ordinary crime—not something involving, say, possession of materials for journalistic purposes; (2) there’s probable cause to believe a journalist possesses classified documents or child pornography, making this a check on the first exception above; (3) the information sought is necessary to prevent injury or death; or (4) a journalist has ignored a subpoena or is likely to destroy the information sought if it were subpoenaed.

It’s also worth noting, as I’ve written before, that the PPA’s application to information stored on cloud services is unclear.

Is a promise of confidentiality a binding contract?

Although it’s not exactly a privilege issue, I’m also asked in this area about the consequences of revealing confidential information after promising not to do so. The short answer: If a journalist makes such a promise to a source in return for information, and the journalist later discloses the source’s identity, the journalist could be sued successfully on a breach-of-promise theory. In the 1991 case Cohen v. Cowles Media, a campaign worker in the Minnesota gubernatorial race provided opposition research to the Minneapolis Star and Tribune and the St. Paul Pioneer Press—after receiving confidentiality promises from them. The papers then identified the worker in their stories, and he was fired.

When the worker sued the papers, they argued that the First Amendment did not allow a plaintiff to recover damages for breaking a promise. More specifically, they contested the worker’s use of promissory estoppel law, which says that if a party changes her position by acting in reliance on a gratuitous promise, then she can enforce the promise even if it lacks the essential elements of a contract. The Supreme Court, siding with the worker, said it didn’t offend the First Amendment to apply promissory-estoppel principles to the press.

Protecting sources: Not just about the law

Knowing the ins and outs of the reporter’s privilege is important when you’re trying to protect sources—but I’d be remiss if I didn’t mention that protecting sources today is as much about technology and electronic security as it is about the law.

The Pew Research Center, in association with Columbia University’s Tow Center for Digital Journalism, last year released a survey of members of Investigative Reporters and Editors which found that 64 percent of respondents believe the US government has collected data about their phone calls, emails, or online communications; 80 percent believe that being a journalist increases the likelihood that their data will be collected; and 71 percent of US journalists have “not much” or “no confidence at all” that internet companies can protect their data from third parties.

The basic problem, of course, is that nearly everything a journalist does to communicate digitally leaves a trace, and if you’re trying to protect a confidential source, that can be a formidable risk to manage. Beyond the obvious admonitions not to keep anything hyper-sensitive in the cloud, or on an unprotected server, or in an unlocked phone, check out these resources to learn more about protecting your digital information:

Defense against the dark arts: Basic cyber-security for journalists.

A Guide to Easy Cybersecurity for Journalists.

CPJ Journalist Security Guide: Technology Security.

Investigating the Computer Security Practices and Needs of Journalists.

* Correction: The original version of this sentence incorrectly described the configuration of opinions in the Branzburg case. The sentence has been corrected.

Has America ever needed a media watchdog more than now? Help us by joining CJR today

Jonathan Peters is CJR’s press freedom correspondent. He is a media law professor at the University of Georgia, with posts in the Grady College of Journalism and Mass Communication and the School of Law. Peters has blogged on free expression for the Harvard Law & Policy Review, and he has written for Esquire, The Atlantic, Sports Illustrated, Slate, The Nation, Wired, and PBS. Follow him on Twitter @jonathanwpeters.