ABC journalists behind this week's explosive reporting on secret cabinet documents could have faced 15 years in jail if proposed espionage laws existed today, according to a former judge.

Former NSW Supreme Court judge Anthony Whealy said the proposed laws could criminalise even the handling of secret documents like those found in the Cabinet Files.

"The one thing I would point out about the legislation that does concern me particularly is that classified information is an element of the offence," he said.

"That is to say, if you've got a filing cabinet that is full of classified information … that means all the Crown has to prove if they're prosecuting you is that it is classified — nothing else.

"They don't have to prove that you knew it was classified, so knowledge is beside the point."

Canberra has scrambled to contain the fallout of this week's reporting on secret cabinet documents, which has clearly shaken senior politicians and public servants.

It's a worrying prospect for journalists that they may not be able to do this sort of reporting again if the proposed espionage laws are passed.

But what if you're not a journalist and you stumbled on some secret files, what could happen to you?

What if you found secret files?

The laws announced by Malcolm Turnbull late last year are yet to be passed in Parliament, but are designed to tackle foreign interference in Australia.

Many groups have raised concerns, including media organisations who say they unfairly target journalists trying to do their job.

But really anyone could be prosecuted just for possessing classified information, regardless of whether they know about it.

That might include, for instance, if you stumbled across a folder of secret files in a regular skip bin while walking home and handed it over to a journalist.

According to Mr Whealy, the laws would be better if they included protections for people, including journalists, acting in the public interest.

Former NSW Supreme Court judge Anthony Whealy is calling for a national anti-corruption watchdog. ( ABC News: Tom Joyner )

"We won't know until we get to trial and there may be an argument about what is in the public interest and whether what you were doing was fair and accurate reporting," he said.

"I would argue that it would be much fairer if there was some type of exemption in the act for journalists who are acting in good faith and acting in the proper way."

The proposed laws also raise other questions around the Cabinet Files that we don't yet have answers to.

For example, what would happen to the owner of the furniture store that sold the filing cabinet? What about the confidential source that bought it?

What could this mean for journalists?

The proposed laws are aimed at cracking down on foreign spies, but Mr Whealy said they remain too broad and must be rewritten to protect the media and whistleblowers.

"We have a completely new regime now on secrecy and there are genuine media concerns," he said.

Many journalists have said they're worried the laws could criminalise important reporting.

In response, Attorney-General Christian Porter is weighing up whether to give himself the power to stop journalists from being prosecuted.

"The fact that the Attorney-General says it's not aimed at journalists, doesn't really stand up when you look at the wording of the legislation because it clearly is aimed at journalists," Mr Whealy said.

"We've had the fiasco, if you like, of the filing cabinets that found their way to the ABC."

Mr Whealy cited back to 2014 when the ASIO legislation was altered, and the then-Attorney-General George Brandis gave direction to the director of public prosecutions that no journalist was to be prosecuted unless he authorised it.

Mr Porter has said that he would consider setting up a similar sign-off safeguard to protect journalists.

That would mean he would have the power to block the prosecution of journalists under the proposed secrecy laws, replicating the safeguard Mr Brandis had in place.

He also said that there would likely be changes to the amendments, but they would probably be minor.

Mr Whealy said the potential effect of the proposed laws would be to make journalists more timid and fearful of prosecution.

"You're probably a much more braver journalist than I would be, but if I were in your position and some information came my way, I would be very concerned that I might be facing a 10 or 15 years in jail if I report that," he said.

So far in Australian history no journalist has been prosecuted under the espionage laws.