The Government has agreed to amend one of its more contentious national security laws and possibly turn it into something sensible and proportionate. Finally, a win for due process and oversight, writes Michael Bradley.

Today, a happy law story. The topic is section 35P of the ASIO Act - the one that threatens to put journalists (and anyone else) in jail for up to 10 years if they disclose information relating to an ASIO "special intelligence operation" (SIO).

I've written about this gem one, two, three and four times previously. I actually started to suspect that nobody in Parliament had read the law they were passing.

The media got onto it too late and s35P went through with the full and inexplicable support of Labor.

I imagine that the media's belated but vocal objection is how s35P became the subject of the first question referred to the newly appointed Independent National Security Legislation Monitor, Roger Gyles QC, in late 2014. Specifically, he was asked to consider the impact on journalists of the operation of s35P.

I didn't expect this to lead anywhere. Gyles' predecessor, Bret Walker SC, had diligently conducted wide-scale reviews of the vast array of national security laws passed since 9/11, and delivered several detailed reports making recommendations for the repeal, consolidation or simplification of many of them. He had been routinely ignored by the Abbott government and, when his term ended in 2014, the Government tried to abolish the position altogether. That bid was abandoned, and Gyles was eventually quietly appointed.

Gyles, like Walker, is a great choice - combining legal brilliance with completely uncaring independence. He's taken his job seriously. Still, I wasn't among those expecting that anything he did would actually be listened to, let alone acted upon, by the Government, even post-Abbott. Happily, I was wrong.

Gyles conducted a public inquiry into s35P, attracting submissions from many interested parties (I disclose that I made a submission, which I'm confident had no impact on the result). He produced his report in October last year, and it was finally released by the Government this week along with the surprising news that it has accepted all his recommendations.

Gyles accepted that the regime for SIOs is necessary, and that it is appropriate for there to be special secrecy offences relating to them. I still don't understand this, but Gyles had the benefit of secret briefings from ASIO, so really we just have to take his word for it.

Centrally, Gyles found that:

Section 35P is not justified. It does not contain adequate safeguards to protect the rights of outsiders (anyone who isn't an ASIO operative) and is not proportionate to the threat of terrorism of the threat to national security.

So there, like we've been saying all along.

Interestingly, Gyles also concluded that s35P in its present form may be constitutionally invalid as it infringes on our implied freedom of political communication.

Gyles recommended three changes to s35P, substantially watering it down. Before I explain these, a reminder that s35P contains two offences: the "basic" offence, with a five-year jail term, for any disclosure of SIO-related information to anyone, ever; and the "aggravated" offence, with a 10-year term, where the disclosure is intended to or will endanger the health or safety of anyone or prejudice the effective conduct of the SIO.

To be guilty, you don't have to know that the information you're disclosing relates to an SIO (which are, of course secret, so there's no way you ever can know this); you only have to be reckless as to that fact.

As Gyles concluded, that has exactly the "chilling effect" on journalists that everyone's been complaining about. It means nobody could ever safely report on anything that might be an ASIO operation, without risking prosecution.

Gyles' solution distinguishes between "insiders" (ASIO people) and "outsiders" (everyone else). These are his recommendations:

The offences stay as they are for insiders.

The offences stay as they are for insiders. For outsiders, the basic offence gets an additional element. An outsider only commits an offence when reporting on an SIO, if the disclosure will endanger people's health or safety, or prejudice the SIO. As to their knowledge of this, the standard is recklessness - meaning they need to have been aware of the risk that that harm could result from the disclosure, and decided to go ahead anyway.

For outsiders, the basic offence gets an additional element. An outsider only commits an offence when reporting on an SIO, if the disclosure will endanger people's health or safety, or prejudice the SIO. As to their knowledge of this, the standard is recklessness - meaning they need to have been aware of the risk that that harm could result from the disclosure, and decided to go ahead anyway. The aggravated offence for outsiders remains the same, but they will only be guilty if they had actual knowledge that the disclosure would cause harm.

The aggravated offence for outsiders remains the same, but they will only be guilty if they had actual knowledge that the disclosure would cause harm. Finally, outsides should have a defence of prior publication. If the information has already been published somewhere (not by you), then you can go ahead and report on it if you have reasonable grounds to believe that doing so won't cause more damage.

Basically, journalists will be fine unless the information they want to publish is really sensitive, such that it should be obvious to them that it could cause physical harm or stuff up an ASIO operation. An example would be disclosing the names of current ASIO operatives. It would still have to be proved either that they knew the harm would be caused (and presumably therefore intended it), or that they were reckless as to the probability of that harm. That's fair enough.

The Government says it intends to amend s35P accordingly. There is, however, one little sleeper we'll need to watch. The prior publication defence is absolutely essential; once information is out in the public domain and the damage has been done, nobody should be liable for reporting further on it.

The Government's response to this is equivocal. It says that, prior to making a second publication, the person doing it should take reasonable steps to ensure that it is not likely to cause harm. That's materially different from what Gyles recommended, as it turns a passive requirement of reasonable grounds for belief into a positive obligation to make sure that no harm will occur. It's not splitting hairs to be worried about this. It will be interesting to see what the proposed amendment looks like. The media needs to be diligent about this, this time; we know Labor won't be.

If the end result of this process is that s35P is turned into a sensible, proportionate law, then it will have been a victory for due process and sensible oversight mechanisms. It's the law, working as it's supposed to. Something to cheer for.

Michael Bradley is the managing partner of Sydney law firm Marque Lawyers, and he writes a weekly column for The Drum. He tweets at @marquelawyers.