When freedom of information and transparency are stifled, then bad decisions are often made and heartbreaking tragedies occur – too often on a breathtaking scale that can leave societies wondering: how did this happen? Think about the recent debates on torture, assassination by unmanned aircraft, secret warrants and detentions, intelligence and surveillance courts, military commissions, immigration detention centers and the conduct of modern warfare. These policies affect millions of people around the world every day and can affect anyone – wives, children, fathers, aunts, boyfriends, cousins, friends, employees, bosses, clergy and even career politicians – at any time. It is time that we bring a health dose of sunlight to them.

I believe that when the public lacks even the most fundamental access to what its governments and militaries are doing in their names, then they cease to be involved in the act of citizenship. There is a bright distinction between citizens, who have rights and privileges protected by the state, and subjects, who are under the complete control and authority of the state.

In the past decade or so there have been an increasing number of clashes – both in the public and behind the scenes – between the US government, the news media and those in the public who want fair access to records that pertain to the implementation of policies by their government.

After the establishment of the National Security Division of the Department of Justice in 2006, there have been more national security and criminal investigations into journalists and prosecutions of their sources than at any other time in the nation’s memory. Eight people have been charged under provisions of the Espionage Act of 1917 for giving documents and information to the media by this administration alone – including me, former CIA officers Jeffrey Sterling and John Kiriakou, and the former Department of State analyst Stephen Jin-Woo Kim.

The roots of this crackdown seem to have begun before the administration took office: Steven Rose and Keith Weissman were prosecuted for sharing information about classified foreign policy issues to members of the media, analysts, and officials of a foreign nation, though neither man worked for the government or had a security clearance. The lawyers who prosecuted Rose and Weissman successfully established their broad interpretation of the Espionage Act before Judge TS Ellis III; though he ruled in their favor, he also warned that “the time is ripe for Congress to engage in a thorough review and revision of [the Espionage Act of 1917] to ensure that they reflect ... contemporary views about the appropriate balance between our nation’s security and our citizens’ ability to engage in public debate about the United States’ conduct in the society of nations.

And, when I was court-martialed for providing government documents and information that I felt were in the public interest to a media organization, the government charged me with “aiding the enemy” – a treason-related offense under the US constitution and military justice system that even civilians may be charged with. During one of my pre-trial hearing in January 2013, the military judge in my case, US Army Colonel Denise Lind, asked the government lawyers: “Does it make any difference – if we substituted Wikileaks for The New York Times, would the government still be charging this case in the manner that it has and proceeding as you’re doing?” An assistant trial counsel for the government answered a straightforward “Yes, Ma’am”; the lead trial counsel elaborated with a reference to a US Civil War era court-martial, in which the soldier was sentenced to six months imprisonment without a trained lawyer representing him, or any post-trial appeals process: “This isn’t the first time that Article 104 has been charged for a service member providing information to the enemy through a member of the news media.”

The government further argued that there was no distinction to be made between any media organizations that provided information to the public, if the government felt would “aid” the enemy: whether such information was published by a small-time blog, a controversial website like Wikileaks, a national newspaper like the Washington Post, or an international one like the Guardian, to the government, they can all be “aiding the enemy”.

After 9/11, a dedicated office of lawyers specializing in novel applications of law for national security issues, the National Security Division (NSD), was created and now, with a small caseload and an enormous amount of resources, this division of the Department of Justice has been waging a quiet war against the media, their sources and the right to free speech and a free press, using the growing national security and surveillance apparatus to prosecute various cases and, occasionally, target the media.

Consider the Department of Justice’s admission in May 2013 that they had secretly seized sensitive office, home and cellular telephone records from more than 20 reporters working for the Associated Press while investigating a leak leading to a 2012 AP news story reporting on an operation foiling a terrorist plot. The president of the AP, Gary Pruitt, called the actions a “massive and unprecedented intrusion” and noted that the government’s actions were creating a profound chilling effect on sources and members of the press. The president personally defended the actions of the Department of Justice, saying: “I make no apologies”.

The US needs legislation to protect the public’s right to free speech and a free press, to protect it from the actions of the executive branch and to promote the integrity and transparency of the US government.

We need to create a media “shield” law with teeth and substance that creates an effective federal privilege for communications between a journalist and her sources, preventing the government from compelling testimony from the journalist and to protect the documents, records and other information created by the journalist and the actual communications between the journalist and her sources. The privilege should be in effect unless the government can prove with clear and convincing evidence that very clear and dangerous circumstances should merit an exception.

We also need to narrow the murky and awkward military offense of “aiding the enemy” into a time of war offense and restrict its application to military personnel. It can be replaced through the creation of an explicit “treason” and “misprision of treason” offense under military law – based on existing US civilian law – for those who openly wage war and attempt to overthrow the US government.

It is also long past time for the government to live up to its commitment to transparency by enacting the changes to the Freedom of Information Act (Foia) and records retention rules that were in the Foia Improvement Act of 2014, which nearly passed in the US Congress at the end of last year and were re-introduced this year. It should also amend the Espionage Act and the Computer Fraud and Abuse Act to require that the government prove a clear intent to harm the government or anyone else and to make the motive of the accused relevant at trial.

These changes would go far – but certainly not all the way – toward ensuring that future citizens under future administrations can continue to be able to question and criticize their government without fear of being publicly humiliated and prosecuted by their government. It would also set a clear example to the rest of the world that, in a truly modern democratic republic, the suppression of the press and sources by criminal prosecutions cannot be tolerated. Then the US could no longer be used as an excuse by repressive governments around the world to say: “Well, they do it in America, too.”