CSAM, and other harms, are typically detected using a set of specially trained, faster and cheaper models (and out of band matching techniques) that run before and after the main model.
Any mention in the system prompt is mostly defense in depth, and to make refusals more graceful.