The Turnbull government is poised to backtrack on its controversial proposed secrecy laws as Labor leader Bill Shorten vowed to block the legislation unless journalists were better protected.

The laws before the Parliament could see journalists, informants and others jailed for up to 20 years for receiving, dealing with or communicating protected government information.

Drawing a rare line in the sand on national security, Mr Shorten said freedom of the press was paramount and Labor would not support the foreign espionage crackdown in its current form.

“I won’t support laws that see journalists imprisoned simply for doing their jobs," he told Fairfax Media. “If these laws don’t adequately protect journalists doing their job, the government needs to fix its mistakes."

That is likely to happen sooner rather than later, with Mr Porter reassuring media bosses he intends to patch weaknesses in the bill, in an announcement understood to be on the cards this week.