Article 723-29 of the French Code of Criminal Procedure
When a person has been sentenced to a custodial sentence of seven years or more for a felony or misdemeanour for which socio-judicial supervision is incurred, or of five years or more for a felony or misdemeanour committed again as a repeat offender, the sentence enforcement court may, at the request of the public prosecutor, order as a security measure and for the sole purpose of preventing a repeat offence,…