Investigative pyschology

There are quite clear guidelines and codes of conduct for all practising psychologists. But what happens when psychologists work with law enforcement to disrupt and combat criminal activity? Should they be bound by the same ethical standards that apply to others in their profession?