WASHINGTON — Three weeks before a Jordanian double agent set off a bomb at a remote Central Intelligence Agency base in eastern Afghanistan last December, a C.I.A. officer in Jordan received warnings that the man might be working for Al Qaeda, according to an investigation into the deadly attack.

But the C.I.A. officer did not tell his bosses of suspicions — brought to the Americans by a Jordanian intelligence officer — that the man might be planning to lure Americans into a trap, according to the recently completed investigation by the agency. Later that month the Qaeda operative, a Jordanian doctor, detonated a suicide vest as he stood among a group of C.I.A. officers at the base.

The internal investigation documents a litany of breakdowns leading to the Dec. 30 attack at the Khost base that killed seven C.I.A. employees, the deadliest day for the spy agency since the 1983 bombing of the American Embassy in Beirut. Besides the failure to pass on warnings about the bomber, Humam Khalil Abu-Mulal al-Balawi, the C.I.A. investigation chronicled major security lapses at the base in Afghanistan, a lack of war zone experience among the agency’s personnel at the base, insufficient vetting of the alleged defector and a murky chain of command with different branches of the intelligence agency competing for control over the operation.

HAMBURG, Germany — This wealthy port city advertises its bustling canals and bridges and its towering 19th-century churches to draw visitors from around the world.

It is less interested in drawing more attention to Al Quds Mosque, where the Sept. 11 hijacker Mohamed Atta prayed and which has become a destination for jihadi tourism. This summer, local authorities closed the mosque, since renamed Taiba Mosque, altogether.

Although Germany has been spared the terrorist attacks that have hit the United States, Britain and Spain, Hamburg — and Germany in general — remains a breeding ground for Islamic radicals, security officials acknowledge. A spate of recent arrests and terrorism warnings in Europe and Afghanistan has underscored the risk that a small number of German citizens are under the sway of terrorist groups determined to stage new attacks, either in Germany or elsewhere in Europe.

TEN years ago, Qaeda terrorists blew a hole in the side of the Navy destroyer Cole in Yemen, killing 17 sailors. Yet the attack’s mastermind still hasn’t been prosecuted, and many of the men tried and imprisoned for the bombing are again free.

As Washington debates whether to increase aid to Yemen, it should first remember its duty to seek justice for those sailors — and to heed the broader national-security lessons from the attack.