This week, the Australian Security Intelligence Organisation (Asio) and the attorney general raised the stakes in the debate about national security and civil society. Asio raided the office of lawyer Bernard Collaery, apparently looking for material relating to disclosures made by a former Australian Security Intelligence Service (Asis) officer. Presumably, Asio acted because it was concerned by the national security impacts of the disclosures. The effect of this, whatever the intention, is to undermine East Timor’s case against Australia in The Hague about the Timor Sea treaty.

This interference with the proceeding in The Hague is confronting. If it was unintended, it is disappointing. If it was deliberate, it is gravely troubling. The public has a right to know which it is.

These events are also worrying because of the impact upon the principle of lawyer-client privilege. This privilege is an important building block of the adversarial system of justice. It protects the client by preventing the lawyer from passing on any communications about legal advice or potential litigation without their permission. A client can feel comfortable discussing their situation in a frank manner, without fear of self-incrimination or that such communications could be passed on to another person.

The raid on Collaery’s office is an example of the interests of an intelligence agency conflicting with the interest we all have in a functioning and fair legal system, of which lawyer-client privilege is an important part. It is not at all clear that the nebulous requirements of national security should take priority.

The central problem here is one of scrutiny. Asio, like our other intelligence agencies, is largely free of it. The statutory framework which governs its actions is very broad. The Australian Security Intelligence Organisation Act 1979 sets out the test for issuing a warrant, which is that the material will "substantially assist the collection of intelligence … that is important in relation to security." The scrutiny is that the attorney general must sign off on the warrant. In other words, meaningful scrutiny can safely be assumed to be absent.

The other, less specific methods for holding Asio to account are similarly uninspiring. The inspector general of intelligence and security reviews the actions of security agencies. It reports to parliament but remains part of the executive arm of government, and therefore lacks the necessary independence. The parliamentary joint committee on intelligence and security is hamstrung legislatively, forbidden from examining intelligence gathering priorities or particular operations of agencies like Asio.

The effect of this is that Asio is left to decide what constitutes national security and what principles are appropriate to sacrifice in pursuit of intelligence collected in its defence. Even the US, that crucible of existential threats to national security, is ahead of us on this. The foreign intelligence surveillance courts, for all their opaqueness and limitations, at least review applications for surveillance warrants by intelligence agencies. In Australia, we have no such judicial oversight.

The decision by an intelligence agency to usurp lawyer-client privilege is one that ought to be taken very seriously. The supposed benefit of the intelligence gathered must be weighed against the inevitable undermining of confidence in our legal system.

But this entire debate about the Asio’s raid generates a much larger and no less important question about oversight of intelligence agencies. The former Asis whistleblower has apparently alleged his intelligence agency assisted our government to break international law, cheat in negotiations (cravenly risking the safety of aid workers by using them to do so) and, worst of all, did so in the service of corporate, not national, interests. What if these allegations are true?

We are constantly told that intelligence agencies must be left to do their important work, trusting they will serve the public interest appropriately. With each new revelation by whistleblowers about the work of such agencies, this looks increasingly foolish.

Sunshine is the best disinfectant: we need an investigation into the operations of our intelligence agencies that is able to examine their conduct and set parameters for genuine accountability. It is perfectly possible to do this without risking lives or operations. Indeed, the opposite is true: inaction assures that the kind of risky and unethical conduct of ASIS in East Timor will only be repeated.

Forty years ago, then-attorney general Lionel Murphy, concerned he was not being provided with information he requested, ordered a Commonwealth Police raid on Asio. Thirteen years later, Malcolm Turnbull carved out his legal career acting in the Spycatcher case, resisting attempts by the British government to suppress publication of a book by an MI5 spy. Subsequently, under the Keating government, Asio’s budget was cut on the basis that the Soviet Union had collapsed.

Today, all those events seem unimaginable. The so-called protection of national security is a blank cheque that is being cashed repeatedly, in ever higher denominations. It is time for proper accountability.