Lord Toulson (who retired from the Supreme Court last month) delivered the court's judgment and had this to say about the justifications for disclosure that HMRC had provided (paras.  and ):
As to the justifications put forward by HMRC, a general desire to foster good relations with the media or to publicise HMRC’s views about elaborate tax avoidance schemes cannot possibly justify a senior or any other official of HMRC discussing the affairs of individual tax payers with journalists. The further suggestion that the conversation might have led to the journalists telling Mr Hartnett about other tax avoidance schemes, of which HMRC knew nothing, appears to have been no more than speculation, and is far too tenuous to justify giving confidential information to them. The fact that Mr Hartnett did not anticipate his comments being reported is in itself no justification for making them. The whole idea of HMRC officials supplying confidential information about individuals to the media on a non-attributable basis is, or should be, a matter of serious concern. I would not seek to lay down a rule that it can never be justified, because “never say never” is a generally sound maxim. It is possible, for example, to imagine a case where HMRC officials might be engaged in an anti-smuggling operation which might be in danger of being wrecked by journalistic investigations and where for operational reasons HMRC might judge it necessary to take the press into its confidence, but such cases should be exceptional".
A written summary of the judgment is available is here (pdf). Lady Hale provided a spoken summary of the court's judgment this morning: see the below video (also available here).