This contradictory circumstance has produced the best and worst of times.

The Whistleblower Protection Enhancement Act (WPEA) provides unprecedented employment protections. No other president has come close to President Obama on strengthening whistleblower job rights. Thanks to him, even national security workers now have in-house free speech rights. These breakthroughs last year were enormous wins after decades of resistance.

Simultaneously, the Obama administration has attacked more national security whistleblowers as Espionage Act criminals than all previous administrations combined, lumping them in with spies. The WPEA provides on-the-job protections, but does nothing against retaliatory prosecutions.

While they are the fewest in numbers, we need national security whistleblowers the most. They expose the worst abuses of power: blanket illegal wiretapping, human rights abuses, military murder of journalists and war crimes.

They keep us safer, too. Senior Marines science adviser Franz Gayl blew the whistle and freed delivery of life-saving MRAPs (Mine Resistant Ambush Protected vehicles) to Iraq, overcoming delays responsible for thousands of unnecessary casualties. Then came nightmarish years climaxed by loss of security clearance to finish him off. He was eventually reinstated in a still-pending legal case.

Whistleblowers like Gayl first tried institutional channels and did not leak any classified information, yet were treated as potential traitors. That sends a strong message: if you see something wrong, keep quiet. Tailing cars and families, surveillance of homes and communication, criminal investigations, and FBI gunpoint raids increasingly are the tactics to silence national security whistleblowers.

Far from accidental or random, this reflects the calculated, sustained campaign by a rapidly expanding national security bureaucracy that is winning a war within the administration.

Sometimes whistleblowers must rely on reporters to get the truth out. Thomas Tamm revealed Bush-era warrantless wiretapping in the New York Times. WikiLeaks and the Pentagon Papers were exposed through news stories. Without national security whistleblowers, the media can't do its job when the stakes are highest: threats to freedom from our own government.

Award-winning reporters like Michael Isikoff, Seymour Hersh, Jane Mayer, Bill Keller, Tom Vanden Brook, Dana Priest and David Carr criticize the repression in War on Whistleblowers. These top-caliber journalists highlight whistleblower media partnerships and sound the alarm about a crackdown.

None too soon. The stakes have just been raised exponentially. In court and proposed rules, the administration is seeking to rebrand virtually all federal employees as national security workers at the mercy of a McCarthy-era executive order, outside the civil service rule of law that has kept the federal workforce professional and non-partisan since 1883.

They no longer could defend themselves against charged misconduct at the independent Merit Systems Protection Board. The WPEA's provisions, laws against race, sex and religious discrimination and the ban on political purges, all would lose relevancy. They'd be replaced by self-policing from agencies empowered to designate virtually any employee a "sensitive" national security worker. This means a civil service system vulnerable to replacement by a national security spoils system. The administration's litigation and regulatory blitz seeks to turn all job and transparency rights into window-dressing.

Reinforcing the forces of light in this bizarre Obama v Obama war, his own appointees from the Office of Special Counsel and MSPB are in court fighting the Justice Department over the national security exception. The GAP's Make It Safe Campaign is petitioning President Obama to demand that he let his own people enforce civil service laws, and that Congress make whistleblowing a legal defense to retaliatory criminal prosecutions.

It should not be legal to prosecute whistleblowers when it is illegal to fire them. This is inexcusable.

•Robert Greenwald's new film, War on Whistleblowers, opens 19 April in New York City at the Quad and on 26 April in Los Angeles at Laemmle Music Hall. It will be available on DVD, from 3 May