Martin McGartland is suing MI5 for breach of contract and negligence after he was shot by the IRA in 1999.
A High Court judge said because of sensitive evidence in the case, "closed material proceedings" could be used in the interests of national security.
Three appeal judges have agreed that judge was entitled to take that view.
Mr McGartland, 43, was given a new identity after he was shot in Whitley Bay on Tyneside.
A former agent of the Royal Ulster Constabulary's Special Branch, Mr McGartland claims the security services failed to provide care for post-traumatic stress disorder and access to disability benefits.
Mr McGartland blames "years of neglect" by MI5 for leaving him traumatised and unable to work because of his secret life.
A judge said that "sensitive material" relating to protecting and training security service "handlers" arose in the case.
Upholding the declaration, an appeal judge said he had read the High Court decision as going no further than "opening the gateway" to closed material proceedings being a "possibility".
He added that he expected any application to use them to be "scrutinised with care", and the court must consider serving a summary of the evidence.
The ruling means Mr McGartland and his lawyers will not be able to hear parts of the case or see material deemed to be sensitive.
Special advocates will be appointed to protect his interests at court hearings.
Mr McGartland, from west Belfast, has written a book about his experiences, 50 Dead Men Walking, that was made into a film in 2008.
The Court of Appeal has ruled that the home secretary can use secret court hearings to defend a damages claim being brought by a former IRA informer.