A federal judge is agreeing with the FBI's contention that publicly disclosing its methods on how it spies on journalists could hamper national security.

A Freedom of Information Act lawsuit brought by the Freedom of the Press Foundation sought FBI procedures surrounding the agency's protocol when issuing National Security Letters (NSLs) against members of the media. Without a court warrant, an NSL allows the bureau to obtain "subscriber information and toll billing records information, or electronic communication transactional records" from third-party wire or electronic communication providers if such information is "relevant to an authorized investigation to protect against international terrorism or clandestine intelligence activities."

The items withheld from the organization, according to US District Judge Haywood Gilliam, included "instructions for managing and conducting cyber investigations," the "instructions for investigating and charging members of the news media," an NSL "PowerPoint training presentation," and other materials in draft form.

Judge Gilliam, in deciding Monday that the FBI does not have to disclose the information sought, ruled (PDF) that the FBI "described with particularity that the withheld documents all contained non-public information about the FBI's investigative techniques and procedures. These pages not only identified NSLs as an investigative technique but also described information such as the circumstances under which the techniques should be used, how to analyze the information gathered through these techniques, and the current focus of the FBI's investigations."

The San Francisco-based Freedom of the Press Foundation sued (PDF) the government in 2015 seeking the information, arguing that keeping it secret was chilling the press and its sources. The suit came two years after The Associated Press revealed that the Justice Department had secretly seized telephone records for as many as 20 lines used by the AP's reporters and editors as part of an investigation in 2013 into the leak of a Yemeni-based terror plot. The DOJ has also investigated phone records of a Fox News correspondent as well as a Washington Post reporter.

As part of the fallout, the Justice Department updated (PDF) its media guidelines in 2013 and set new standards about when subpoenas could target journalists. But those rules did not address NSLs.

Freedom of the Press Foundation Executive Director Trevor Timm said in an e-mail, "This is an extremely disappointing decision. Whether it's the Obama administration or the Trump administration, the government should not be able to keep its rules for spying on journalists without a court order secret. It is antithetical to a democracy that supposedly values a free press. We are evaluating our options and will announce whether we will appeal the case soon."

What we do know about NSLs and how they are used against the media was revealed by The Intercept last year.

The Intercept wrote:

The rules stipulate that obtaining a journalist’s records with a national security letter (or NSL) requires the signoff of the FBI’s general counsel and the executive assistant director of the bureau’s National Security Branch, in addition to the regular chain of approval. Generally speaking, there are a variety of FBI officials, including the agents in charge of field offices, who can sign off that an NSL is “relevant” to a national security investigation.

The guidelines are known as Classified Appendix G.

Strangely, the FBI did not mention this appendix in the listing of documents it was withholding from the Freedom of the Press Foundation. Generally, under FOIA, agencies usually note documents they have that are relevant to the lawsuit and then say they are withholding them for a variety of reasons—national security usually being chief among them. Judge Gilliam said it didn't matter, though.

"While the FBI’s search may not have been perfect, plaintiff was 'entitled to a reasonable search for records, not a perfect one,'" said the judge, quoting another opinion on the topic.