Use of data that may contain future ethical complications
Suppose that you are afforded an opportunity to examine data that was,
  on the surface at least, collected legally and ethically, but that may
  contain hidden ethical dilemmas. What precautions, if any, should you
  take when working with this data?


There is no simple way to answer this kind of general question, but thankfully most institutions in the academic world are equipped with ethics committees whose job is exactly to answer such questions. They provide general guidelines and can be asked specific questions, their role is to guide researchers through potentially difficult questions and to set the boundaries. Depending on the specifics of your case, they might for instance ask you to take additional steps to protect individuals privacy, or even tell you that the study that you are considering is not ethically acceptable. Their expertise gives you legal and moral clarity in an area where you are not the expert.

On a related note, in large research projects it is usually a requirement to plan for this kind of ethics expertise and oversight.