As a special favour to yourself – a reward for a virtuous life – read the article by Lord Phillips on the way courts accommodate the need that some evidence be kept secret: Nicholas Phillips, “Closed Material” London Review of Books, Vol 36, No 8, 17 April 2014 (currently available here but don’t rely on this link surviving in perpetuity).
As the editor notes, “Nicholas Phillips retired in 2012 after three years as the first president of the UK Supreme Court. ‘Closed Material’ is a version of last year’s Blackstone Lecture, delivered at Pembroke College, Oxford.”
Many of the cases he mentions have been noted here: Chalal, Secretary of State for the Home Department v AF  UKHL 28, and Secretary of State for the Home Department v MB  1 AC 440 here on 11 June 2009, AF again briefly here on 12 June 2009; A & Ors v. Secretary of State for the Home Department  UKHL 56 here on 17 December 2004 (a case which Lord Phillips rates “as [the House of Lords’] most impressive decision in my lifetime”) and which moved me to quote, with rather spooky prescience, Montaigne; W (Algeria) & Anor v Secretary of State for the Home Department  UKSC 8, here on 20 March 2012; Al Rawi v The Security Service  UKSC 34, here on 14 July 2011; Roberts v Parole Board  UKHL 45, here on 11 July 2005.
The case law led to the Justice and Security Act 2013 [UK], and Lord Phillips describes its passage through both Houses of Parliament from his perspective, focusing on disputes as to the criteria which should apply to any decision to permit the use of the closed material procedure (see now, ss 6(5) and 8(1)(c); it seems that efforts to impose more restrictive conditions on the use of the closed material procedure were unsuccessful). The enacted requirement is (broadly, and with qualifications) that “it is in the interests of the fair and effective administration of justice in the proceedings to make a declaration” that a closed material application may be made, and an application must be granted if the court “considers that the disclosure of the material would be damaging to the interests of national security”.
Lord Phillips concludes,
“There is a danger that familiarity with the use of such a procedure will sedate those who use it against the abhorrence that the need to resort to such means should provoke. I would have been happier had the bill stated that it could be used only as a last resort.”