The media union has welcomed changes that water down the Coalition’s espionage bill but said it was still a “very serious concern” to working journalists and should be dealt with by a blanket defence.

The bill, introduced in the foreign interference package in December, contains offences for communicating and dealing with protected information that is classified or harms Australia’s interests in defined ways. The offences are punishable by up to 15 years and five years in prison respectively for commonwealth officers such as public servants.

On Monday the attorney general, Christian Porter, released details of changes announced in February that will create separate offences for non-commonwealth officers, such as journalists, decreasing the prison sentences for them to 10 years and three years.

The changes also give journalists a defence for the offence of dealing with protected information where they “reasonably believe” it is in the public interest to do so.

The chief executive of the Media, Entertainment & Arts Alliance, Paul Murphy, said the defence was a “significant improvement” on the earlier version, which required journalists to demonstrate their work was “fair and accurate”.

Murphy said it was “not clear” the defence of reasonable belief was available for both dealing with and communication of information, meaning journalists could still be exposed to 10 years’ prison for publication of stories relating to national security.

Porter told Guardian Australia the defence applied to both offences because “dealing” with information included communication and publication, as well as other uses. Murphy said if that was the intention the bill should be amended so the defence was explicitly available for both.

For non-commonwealth officers the offences apply where information is classified as secret or top secret; the publication “damages the security or defence of Australia”; “interferes with or prejudices” the prevention, investigation and prosecution of crimes; or harms the “health or safety of the Australian public or a section of [it]”.

Murphy said the proposed amendments had removed some “ridiculous” prohibitions on harm to Australia’s interests including harming relations between Australia’s states. The other examples removed from the bill are harms to the country’s international relations and interfering with the prosecution of civil penalty provisions.

He said there was still a concern about how the prohibited harms to Australia’s interests that have been retained might be interpreted.

“The overriding concern we still have is that media organisations have asked for general media exemption and it’s certainly not here in these changes,” he said.

“The fact that there is a requirement to mount a defence for legitimate reporting is a very serious concern.”

Murphy said a blanket defence was needed because the concept of the “public interest” was vague, the classification of documents as “secret” or “top secret” was an administrative decision that could trigger a criminal prosecution, and attempts to mount and and prove a defence might reveal information about journalists’ sources.

The shadow attorney general, Mark Dreyfus, has suggested the changes don’t go far enough because the government must deal with the “very serious issues” raised by charities, not-for-profits, community groups, media organisations, universities and the Law Council of Australia.

“The government still hasn’t got this right. There are still holes all through it,” he said.

Porter said the changes were aimed at addressing the “central concerns raised by stakeholders” but further recommendations for drafting improvements would be considered when the Parliamentary Joint Committee on Intelligence and Security reported back later this month.

“There has been no intention to unnecessarily restrict appropriate freedoms of the media,” he said.

“Where drafting improvements are identified that strike a better balance, the government will promote those changes.”