pub fn scrub_suotar_body(value: &Value) -> ValueExpand description
Best-effort removal of personal data from a Suotar request or response body. Not a guarantee and not an exhaustive PII filter.
Two mechanisms, because either alone leaks: key matching removes the structured person fields, and the free-text scan is the backstop for the input Suotar’s error messages quote back. A key’s treatment covers its own scalar value and the scalars of an array under it, but objects are always classified again key by key, so an exemption never spreads over a subtree.
The scan only removes email addresses and student-number-shaped digit runs. A name in free text is kept: no pattern separates it from error prose, and the study registry holds it anyway.