The CIA is very quick to 'leak' of its successes to the national press via 'anonymous government officials'. It's just I don't consider staging coups and arming extremist 'rebels' to be part of protecting national security[1].
How can you tell that all successes are leaked and that all the things leaked are actually true? If they prevent 100 terrorist plots but 95 of those were through various means that they wish to keep secret, they would simply only leak the ones for which they don't care that their sources are exposed. In fact, it would be extremely difficult to verify if the stories about arming rebels are even true, or maybe a side plot to play down their competence and lull the actual adversaries into a false sense of security.
It is in the very nature of a spy agency that the general public does not know what they are up to.
If they intentionally leaked nothing, this would be perhaps a reasonable approach.
The fact that they leak positive stuff sometimes, and coupled along with the fact that they run a global network of torture sites (and hacked the computers of their own congresspeople who are their oversight, then lied about doing so) means that they probably aren't as do-good and trustworthy as you seem to think they should be assumed to be.
Of course they're not do-gooders. It's a spy agency, shady stuff is their very raison d'etre.
I was questioning the original point made by AsyncAwait, which was that "CIA does very little guarding national security as far as I can tell." The "as far as I can tell" part of that comment makes the rest just silly, since making sure you can't tell is 90% of spy work.
I've put the "as far as I can tell" part in there precisely BECAUSE from what we CAN tell i.e. has been declassified or leaked, it pretty much all terrible shit that has nothing to do with protecting national security.
Of course there's a lot we can't tell, but given the stories we can tell the ratio of good/bad is way out of whack in favor of the bad, especially given CIA's tendency to selectively leak good stories about itself and its extensive declassified historical record, the amount of 'good' should be a lot higher than it is.
Destroying torture records for example shows that it is way more concerned with illegally concealing bad behavior than avoiding it in the first place.
All the secrecy at spy agencies has been shown time and time again to be primarily to coverup their ineffectiveness and incompetence, not to mention the crimes against humanity.