Australian authorities have launched a formal investigation into claims Chinese intelligence services attempted to plant a spy in the federal government.