No-one could be other than appalled by the terrifying attack inflicted on 52 year old Linda McDonald by convicted murderer Robbie McIntosh.

Even aside from the brutality of an assault which could have killed her, and which left her with permanent injuries, the case raises significant concerns. McIntosh is a convicted murderer who was only out of jail on a week’s “home leave”.

Ruth Davidson demanded this practise be stopped at First Minister’s Questions, calling for a review of such leave for dangerous offenders, and removal of it altogether for convicted murderers.

The public are rightly concerned about such incidents. Whatever the system is for vetting those entitled to home leave, it has plainly failed in this instance.

Nicola Sturgeon says the Scottish Prison Service carries out rigorous risk assessments on those to be allowed home leave. For Mrs McDonald and her family, it goes without saying these are plainly not rigorous enough.

McIntosh, who had served his minimum 15 year sentence for murdering Anne Nicoll in 2001, when he was just 15, has now received a second life sentence. If he is ever released, thanks to an order for lifelong restriction , he will be monitored for the rest of his life. But why was he freed in the first place?

The fact is that prisoners, even murderers, will eventually reach the end of their sentence and home leave is part of the process of rehabilitating them in anticipation of release.

Some would argue that life should mean life. But the possibility of redemption is an important principle at the heart of our justice system. And according to professor Dirk van Zyl Smit, of the University of Nottingham – who is due to speak in Edinburgh next month – the number of prisoners serving life sentences in Scotland is already, proportionately, amongst the highest in Europe.

McIntosh is an exception, not the rule. As Ms Davidson herself acknowledged, he is one of 4,000 prisoners released on home leave every year, and an “extreme example”. Detective Inspector Tom Leonard, for Police Scotland described the incident as “thankfully rare”.

His is an appalling failure of the system, but we should always be careful of making rules or law based on knee-jerk reactions to exceptional occurrences.

Prisoners’ sentences, especially long ones disrupt or destroy many of the factors which make a successful return to the community more likely. Homes and relationships can be lost, employment becomes less likely, and longer-term inmates can find society has changed beyond recognition.

In this context, periods of leave are a valuable aid to readjustment and reduce the chance of recidivism. Most prisoners will eventually be released. Yet the business of assessing when and how is always going to be a matter of judging risk.

What went wrong in this case? One of the problems is that we don’t know. As with the dismay over the release of black cab rapist John Warboys in London, the way such decisions are taken is utterly opaque to the general public.

Mrs McDonald’s husband, on behalf of her family, has called for a probe into how and why her attacker came to be allowed out. This demand for an investigation should be honoured. Ms Davidson argues only the parole board should make such decisions. But it does not matter who assesses any risks attached to release, only that they system does so well and errs on the side of public safety.

Holding out the possibility of redemption for offenders is one of the marks of a civilised society. But support for this principle can only be maintained if the system for assessing such cases is robust, and above all, transparent.