As journalists we enjoy no professional privileges. The application of graft and guile are all that our work requires. Our relationship with the public, however, rests on two vital foundations – that we tell the truth and that we protect our sources.

In defence of the latter, numerous colleagues have gone to prison.

Happily this risk has substantially abated in the UK since Bill Goodwin’s 1996 victory in the European Court of Human Rights. The judges in that case ruled that “the watchdog role of the press is vital to a democratic society” and, as a consequence, the judge who threatened Goodwin with incarceration for refusing to reveal a confidential source was deemed to have acted illegally.

Journalists’ ability to guarantee discretion, however, will soon be fatally undermined with the passing of legislation allowing the police and public authorities, without notice, to seize journalists’ phone data. If precedent is any guide, we can expect this power to be used to hunt down whistleblowers, pursue personal feuds and to throw a cloak over wrongdoing.

The Investigatory Powers Bill has been grinding through Parliament since Theresa May’s tenure at the Home Office. It is the successor to the Regulation of Investigatory Powers Act under which, over three years, 19 Police forces seized 608 separate phone records – including such notorious cases as that of the Sun’s political editor Tom Newton Dunn, whose records were secretly searched in an attempt to find the source of the Plebgate story.

The IPB will codify police powers to seize our phone records. Such data provides a trove for those interested to uncover a journalist’s work.

Phone numbers dialled are all logged, as are websites browsed, photos taken, and emails sent.

More chilling, however, the ‘metadata’ generated by smartphones effortlessly reveals a GPS trail, showing where a phone has been and what other devices have been in its proximity.

And who needs an old-fashioned bugging device when the state can simply remotely activate a smartphone’s microphone to listen in on conversations a journalist and a source should rightfully assume are private and confidential?

You can see why some national newspapers have issued reporters with mini Faraday cages in which to keep their phones but how effective these are is unclear and ultimately better tradecraft is all we will have in our armoury.

The NUJ – working alongside the Bar Council, the Law Society, the Society of Editors and the News Media Association – has been lobbying legislators over the provision of this Bill since its inception.

Improvements have been achieved through our collective effort, but one key central threat remains. Seizing the telephone records of journalists is possible without notice or the opportunity to oppose an application. This is entirely contrary to principles enshrined elsewhere in our law.

The Police and Criminal Evidence Act, for example, makes specific provision of the seizure of journalistic material. Where the police or courts seek access to notebooks, photographs or video, they must go before a judge and make their case. The NUJ has represented numerous members in such cases and while there have been cases where the the courts have ultimately required a hand-over of material, the union has always managed to restrict its extent.

Applying a similar principal to telephone records would at least place sources on notice of possible disclosure. As it stands, we face the prospect of the trust between journalists and sources being fatally undermined.

It is already a relationship that has been under great strain in recent years, particularly in the wake of the cynical and contemptible decision of News Corp to willingly hand over tranches of data and documentation to the Metropolitan Police in the wake of the hacking scandal – a deliberate trade motivated by corporate greed and self preservation, without the knowledge or agreement of the reporters and their sources. A betrayal that has led, as we now know, to the conviction of 34 sources who offered those stories on the basis that their confidentiality would be protected.

The IPB is now at its eleventh hour – and yet none of our political parties have distinguished themselves over this issue.

If journalists, and those who care about journalism, make a cogent case to their MPs in the next days, however, it could still make a difference. The same is true of a few papers making this an issue in their pages.

In a week where journalism itself seems under assault, this is by no means the only legal threat we face.

A clause in the Digital Economy Bill will make it a criminal offence to pass on information that has not been “authorised for sharing”. Which of us has not been given internal documents by a whistleblower to provide the basis for a story about corruption, bad employment practices or wasted public money? In future, both journalist and whistleblower will risk criminal prosecution.

And finally there is the Police and Crime Bill, intended to make possible the prosecution of stalkers. But its implications for journalism – particularly photography – are chilling. It would criminalise taking multiple images of a person without their permission.

There is a public interest defence but, as the amendment is currently framed, an individual photographer might potentially be arrested and thrown in the cells before they were given a chance to make the case that their work was legitimate. If the subject of the photography was wealthy and powerful, a photographer could find themselves making their case from behind bars, in the face of expensive lawyers trying to ensure that they remained locked up.

The price of press freedom is eternal vigilance– to recycle a well-worn saw. Unless journalists are willing to rise up and to at least give voice to our concerns, then that freedom will receive a body blow. It would be tragic, against this perilous backdrop, if, for the minutes it takes to pen an email or letter, any of us fails to issue a protest.

Tim Dawson is president of the National Union of Journalists