As the Senate considers Gina Haspel’s nomination as director of the C.I.A., it is time to dispel the false narrative about her record. That narrative says that Ms. Haspel’s involvement in torture, as well as the order she drafted authorizing the destruction of videotapes documenting this abusive practice, was legal and justifiable.

Torture — “enhanced interrogation,” as it was called — was supposedly legal because Justice Department lawyers had given it their blessing at the time, and destroying evidence of it was legal not only because government lawyers said it was, but also because Ms. Haspel was just following orders.

But Ms. Haspel’s supporters, many of whom are lawyers, should know better: the faulty advice of government lawyers and bosses cannot make illegal conduct legal. And C.I.A. investigations that rely on these specious justifications to excuse her decisions should be given no weight.

In 2002, Ms. Haspel ran a secret detention site in Thailand, code-named Cat’s Eye, that was known for its use of harsh interrogation techniques that amounted to torture. She was also chief of staff to Jose Rodriguez, director of the National Clandestine Service for the agency. While her exact role in the torture of detainees at Cat’s Eye remains unclear, she unquestionably bears some responsibility for the use of so-called enhanced interrogation techniques, including waterboarding, that occurred on her watch.