GINA HASPEL, President Trump’s nominee to head the Central Intelligence Agency, faced a clear test when she appeared before the Senate Intelligence Committee on Wednesday. After a 33-year career at the agency, she may be, in many respects, the most qualified person ever nominated to the post, as one Republican senator contended. But she has a dark chapter in her past: her supervision of a secret prison in Thailand where al-Qaeda suspects were tortured, and her subsequent involvement in the destruction of videotapes of that shameful episode.

As Sen. Mark R. Warner (Va.), the ranking Democrat on the committee, made clear from the outset, Ms. Haspel needs to clearly repudiate that record. She must confirm that techniques such as waterboarding — now banned by law — were and are unacceptable, and she must make clear that she will never again accept orders to carry out acts that so clearly violate American moral standards, even if they are ordered by the president and certified by administration lawyers as legal.

Ms. Haspel did not meet that test. She volunteered that the CIA would not on her watch engage in enhanced interrogations; she said she supported the “stricter moral standard” the country had adopted after debating the interrogation program. Pressed by Mr. Warner and several other senators, she eventually said she “would not allow CIA to undertake activity that I thought was immoral, even if it was technically legal.” What she would not say was that the torture she oversaw was immoral, or that it should not have been done, or that she regretted her own role in it — which, according to senators, included advocating for the program internally.

That ambiguity matters at a time when the United States is led by a president who has cheered for torture, who lacks respect for the rule of law and who demands absolute loyalty from his aides. Unfortunately, it makes it impossible for us, and others for whom the repudiation of torture is a priority, to support Ms. Haspel’s nomination.

We say “unfortunately” because, were it not for what Ms. Haspel herself called the “shadow” of the interrogation program, her confirmation would likely be an easy call even in this time of partisan polarization. She has spent most of her career in the clandestine service, working in multiple difficult and dangerous posts; as she recounted, she volunteered for duty in the CIA’s counterterrorism center on Sept. 11, 2001, and remained there for years. Her nomination has strong support inside the agency and from many of its former leaders, including several who served under President Barack Obama.

Ms. Haspel’s very commitment to the CIA and its people seems to inform her resistance to a clear condemnation of the torture record. “I’m not going to sit here with the benefit of hindsight and judge the very good people who made hard decisions who were running the agency in very extraordinary circumstances,” she said. She said that those working in the counterterrorism center “had been charged with making sure the country wasn’t attacked again, and we had been informed that the techniques in CIA’s program were legal and authorized by the highest legal authority in the country and also the president.”

Those are honorable sentiments, and it is not our view that all in the CIA who were involved in excesses after 9/11 should be barred from senior positions in perpetuity. We also understand Ms. Haspel’s desire to stand by the people she would soon be leading if confirmed. Some accountability nevertheless is essential for someone seeking to become the agency’s director. Ms. Haspel need not throw colleagues under the bus to acknowledge that in accepting the assignment to oversee a secret prison and allow the waterboarding of at least one prisoner, she made a serious error of judgment, and that her own actions were wrong.

Ms. Haspel did suggest that in retrospect, she would not have supported the order given by her superior in 2005 to destroy videotapes of an interrogation in which torture took place. But again her statement lacked moral clarity; she said the error was not making sure “that we had all the stakeholders’ concurrence” for the action, not that it was wrong in itself. She indicated that her own view at the time, that the tapes should be destroyed because they endangered the security of officers who appeared in them, has not changed.

Similarly, Ms. Haspel’s principal justification for saying that she would not allow the CIA to return to interrogations is that the agency is “not the right place to conduct interrogations. We don’t have interrogators and we don’t have interrogation expertise.” That’s true enough, but Ms. Haspel would have served herself better had she offered a principled argument, rather than a pragmatic excuse.

Ms. Haspel did say that “the controversy surrounding the interrogation program . . . cast a shadow over what has been a major contribution to protecting this country.” She might well have been describing her own career. She could, perhaps, still disperse that shadow with a clear statement that the actions of the past were wrong. Failing that, the Senate should not confirm her as director of the CIA.