Doctors and psychologists working for the US military violated the ethical codes of their profession under instruction from the defence department and the CIA to become involved in the torture and degrading treatment of suspected terrorists, an investigation has concluded.