They can't. Every citizen (no matter what kind of low life miserable piece of pond scum they are) are entitled to face their accuser and question the evidence used against them. So her attorney will call all of her co-workers, subpoena her files, cases she has worked on, etc.,etc.,etc. The CIA main montra is "confirm nothing, deny nothing". So the government will never be able to turn over classified information with out risking national security.
For most CIA employees, the firing and removal of their security clearance is a death sentence to them. Where are they ever going to find work again??? Even if they left on good terms with the CIA, the CIA will never even confirm that they were an employee, so they have no past employment records or references and they can't tell anyone what they have experience in doing. The only jobs they can find without starting over in life is within the intel community.
The military would hammer harshly and fairly.
The military, on the other hand, has the ability classify Court-Martials and send people to their own prisons with out the civilian world being involved--or even mattering.
Such considerations did not stop the prosecution of Aldrich Ames, Jonathan Pollard or Robert Hansen when they were caught spying. These trials are not necessarily public.