This chapter explores the legal and moral implications of the use of data science in criminal justice at two levels: police surveillance and the criminal trial of a defendant. At the first level, police surveillance, data science is used to identify places and people at high risk of criminal activity, allowing police officers to target surveillance and take proactive measures to try to prevent crime (predictive policing). At the second level, the criminal trial of a defendant, data science is used to make risk assessments to support decisions about bail, sentencing, probation, and supervision and detention orders for high-risk offenders. The use of data science at these levels has one thing in common: it is about predicting risk. The uncertainty associated with risk prediction raises specific related legal and ethical dilemmas, for example in the areas of reasonable suspicion, presumption of innocence, privacy, and the principle of non-discrimination.