I have a thought experiment for you. Please read this headline:
What from the headline did you think the article was about? What I thought happened was the CIA had an informant but then he became a terrorist who was caught attempting to bomb something, and only then was it discovered that that he had worked for the CIA.
But the truth turns out to be the opposite: he was a CIA operative who infiltrated Al-Qaeda so well that he was picked to lead a bombing operation! Nice job, CIA! And somewhat lackluster job, AP and Huffington Post for your questionable headline selection.
By the way, since this is the Huffington Post a decent percentage of the readership assumed the whole thing was made up: