An attorney-general's argument secret information could not be aired in court was rejected on the premise there was little risk to national security.
The redacted reasons for the decision by then-chief justice Helen Murrell in the ACT Court of Appeal to reject a secret trial for Bernard Collaery in October 2021 were published on Tuesday.
Mr Collaery faced prosecution by the Commonwealth, accused of leaking classified information about an alleged Australian spying operation in East Timor.
Attorney-General Mark Dreyfus ordered the prosecution be dropped in July 2022.
The government neither confirmed nor denied national security policy could remain in place if the information was heard in open court, former chief justice Murrell found.
The attorney-general argued Australia's intelligence-sharing relationships, such as with Five Eyes partners including the US, would be harmed if secret information was made public.
Charging Mr Collaery didn't confirm the accuracy of any of the information he provided, the Commonwealth said.
"The risk of prejudice to national security is low and the consequences risked are not particularly significant," chief justice Murrell wrote in her reasonings.
"The evidence led by the attorney-general was replete with speculation and devoid of any specific basis for concluding that significant risks to national security would materialise.
"On the other hand, the risk of damage to public confidence in the administration of justice where proceedings, or parts of proceedings, are held in closed court is very real."
But Chief Justice Lucy McCallum ruled in favour of an application by the attorney-general to keep redactions on the Court of Appeal judgment in place on national security grounds.
Publishing an unredacted judgment would publicly disclose protected information, Chief Justice McCallum said in her reasonings, also published on Tuesday.
The issue came down to balancing open justice and national security, she said.
"I have given anxious consideration to the importance of publishing decisions of the court with as few redactions as possible," she wrote.
"But I am required ... also to consider the national interest.
"It is in the interest of national security ... to make the redactions sought by the attorney-general."
Human Rights Law Centre senior lawyer Kieran Pender called for more transparency.
"Open justice is a critical democratic principle, protecting the human rights of all Australians," he said.
But it was still a win the Court of Appeal judgment "holding that the interests of open justice and a fair trial were more important than the government's national security concerns" was now public.
Release of the judgments brings Mr Collaery's long-running legal saga to a close.