The former head of Australia’s main spy agency is now advising the Department of Immigration and Border Protection, Crikey can reveal.

Under legislation passed by the government earlier this year, the Department of Immigration and Border Protection combined with Australian Customs to form a single agency known as Border Force. The legislation makes it tougher for employees to blow the whistle on problems in our immigration system and in offshore detention centres, and there has been heavy criticism of its culture of secrecy.

It’s unlikely that secrecy is about to change, with the Department of Immigration and Border Protection confirming to Crikey that former director general of intelligence and security at the Australian Security Intelligence Organisation (ASIO) David Irvine, who stood down last year, has had a contract with the department since late June.

“David Irvine was successful in applying for a limited tender opportunity to lead the review of the department’s intelligence function in support of the consolidated Immigration Department and the Australian Border Force,” a spokesperson for the department told Crikey.

Irvine has been hired for five months between June 23 and November 30 to undertake the task of reviewing the consolidated Border Force and Immigration entity. His contract is worth $159,500.

Before his time at ASIO, he was the head of Australia’s super-secret spy agency, known as ASIS, from 2002 to 2009. Before his intelligence roles, he worked through numerous foreign affairs positions, including as the high commissioner to Papua New Guinea and the ambassador to China.

In his five years as the head of ASIO, Irvine made few public appearances or comments. It was only when the government poorly handled the public debate around mandatory data retention that he, along with AFP Commissioner Andrew Colvin, was brought out to explain and defend the law enforcement agencies’ need for telecommunications companies to store their customers’ communications data for two years so those agencies could access it — without a warrant — as part of  investigations. He maintained at the time that the laws were not a substantial change to current practices — something the telecommunications industry disputes — except, he said, the telcos would now be legally obliged to retain the data.

Irvine also delivered two speeches in the same month in August 2014 on the state of security in Australia and terrorism, and he lifted Australia’s national security threat level from medium to high.

He is well-respected in the intelligence community but was considered to be retired, and he was recently spotted at a Minter Ellison “Hypothetically Speaking” debate on mandatory data retention. It is understood Irvine played the role of the head of a spy agency not dissimilar to ASIO.

His successor at ASIO, Duncan Lewis, has been in the role for over a year, and advised prime minister Malcolm Turnbull on the security situation in his first day in the job. In a speech in August, Lewis said that ASIO was conducting over 400 high-priority counter-terrorism investigations at the time.