The Home Affairs secretary has ordered a sweeping technology audit of all commonwealth agencies to identify potential foreign interference risks.