So the procedure is always the same: You go through immigration at your point of entry, but coming from the US do not need to go through security again [emphasis mine], nor do you need to claim and recheck your luggage.
The procedure is not in fact always the same, and at least two airports that I am personally familiar with -- one of which is in this case CDG -- there is a required security rescreening for US arrivals.
At CDG -- as you are transferring on the same airline in CDG, I'm guessing that you are almost certainly on the Delta / Air France family, which means that you will arrive at 2E (where long-haul, non-Schengen flights arrive) and depart from 2F (Schengen departures only)
From 2E to 2F there will be a security check -- here is a step-by-step guide indicating the re-screening. Here is an Air France guide, which also indicates a security rescreening, if you prefer a more official website.
At MAD -- long-haul non-Schengen flights (at least for Iberia) arrive into Terminal 4S. Making any onward connection -- including to a flight that departs from the same terminal 4S -- requires going through a re-screening. Here is a video from Iberia indicating this.