Retired Gen. David Petraeus, the CIA chief who resigned last week amid an unfolding sex scandal, acknowledged betraying his wife. But there hasn't been any allegation that he betrayed national security.

Members of the Senate Intelligence Committee quite rightly were dismayed that they learned of the investigation from the media rather than from the CIA, FBI investigators, or the director.

And some people who closely follow intelligence matters were curious when Paula Broadwell - the general's biographer and former mistress with the James Bondian name - said during a public appearance that the U.S. consulate in Libya, where terrorists killed U.S. Ambassador J. Christopher Stevens in a Sept. 11 attack, had housed a CIA-operated prison.

Mr. Petraeus has agreed to testify about the Benghazi attack, even as congressional committees sort out the affair. Also involved in the inquiry is Marine Gen. John Allen, the commander in Afghanistan whose appointment as NATO's supreme allied commander has been put on hold. He had engaged in abundant email correspondence with Jill Kelley, the Tampa woman who complained to the FBI of allegedly harassing emails from Ms. Broadwell and set off the inquiry that led to Mr. Petraeus' resignation.

Whether Mr. Petraeus should have had to resign for a personal indiscretion is debatable. He otherwise had a sterling record. There might have been no other choice, however, given the convoluted nature of the case.