From 1b48cbbb008286d1787bc4c309d1351e8326f207 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 18 Oct 2026 17:04:00 +0000 Subject: [PATCH] Harden the export sanitizer after adversarial review Three independent reviewers ran the script against realistic Graph and portal export shapes and leak-path fixtures. Every confirmed finding is fixed and covered by a test: Serializer - escape by code point: soft hyphens, zero-width and control characters were written as \b because a switch on [char] compares culture-aware - fractional numbers and negative zero normalized; Local DateTime values written as UTC so output does not depend on the host time zone Plumbing - top-level arrays no longer unroll (one-element arrays became objects, [] became null) - relative -OutputPath and -NameMapPath resolve against PowerShell's location instead of the process directory - name map values are validated so a display name cannot break the placeholder or smuggle an address into it Coverage - secrets: *SecretSettingValue values, encrypted OMA-URI values and secretReferenceValueId, password/preSharedKey/sharedSecret/*Token keys - composite assignment ids and sourceId,