Gina Haspel has shown she has all the qualities to become the next director of the Central Intelligence Agency, except one.

For 33 years with the agency, Ms. Haspel has been on the front lines of America’s greatest security challenges, rising from station chief, to deputy director of the clandestine service, to deputy director of the agency. Former bosses and colleagues from both parties praise her leadership and professionalism.

What’s prevented her from being a shoo-in for the top job is her role at the center of one of the federal government’s most sickening and indefensible programs, a brutal interrogation regime that used torture against terrorism suspects after the Sept. 11 attacks. It wound down during President George W. Bush’s second term, then was banned by President Barack Obama after stirring domestic and international outrage.

In 2002, Ms. Haspel headed a C.I.A. detention facility in Thailand where a suspect linked to Al Qaeda, accused of orchestrating the attack on the American destroyer Cole off the coast of Yemen, was waterboarded and brutalized in other ways. And in 2005, under her boss’s direction, she drafted a cable ordering the agency to destroy more than 90 videotapes of its interrogation of that man.