The prime minister, Malcolm Turnbull, has appointed two former judges to argue on behalf of journalists in secret court proceedings when government agencies seek access to their phone and internet records.

The federal government passed controversial data retention laws in 2015 that substantially enhance the range of phone and web records available for government agencies to request from telecommunications companies.

Journalists’ information was previously accessible without a warrant under the government’s new metadata laws, but due to concerns raised by Labor and media organisations the government introduced the requirement for a warrant obtained through a secret court hearing.

To act on behalf of journalists, the government introduced a “public interest advocate”, who will also provide an additional safeguard to protect journalists’ sources.

The scheme has still faced criticism because journalists will never be notified of the existence of a warrant for their phone and web records, or the role of the public interest advocates. Even if they do become aware of it, it would be an offence for them to disclose the existence of a warrant.

Documents released by the Department of the Prime Minister and Cabinet show that in October 2015 Turnbull appointed former Queensland court of appeal judge John Muir and former South Australian supreme court judge Kevin Duggan to the public interest advocate roles.

Both men have been appointed for five-year terms.

Serious concerns have been raised about access to journalists’ phone and internet records. The Australian federal police said in 2015 they had accessed an undisclosed number of journalists’ metadata within the last 18 months in the course of investigations.

While the agency did not outline the purposes of this access, a number of news reports on asylum seeker operations have been referred to the AFP with a view to prosecuting sources for disclosing information.