From 279f832656fd24392e316e7bb09994206248335f Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sun, 1 Nov 2026 04:25:58 -0600 Subject: [PATCH] aggregator(cost-explorer): null-prototype setups store (#2851) loadSetups() returned the JSON.parse result directly, so a setup named __proto__ assigned the store prototype instead of becoming an entry (silently never saved), and an imported __proto__ entry mutated the live store prototype while being dropped. loadSetups now copies parsed own keys into Object.create(null); save/import/export handlers unchanged. Regression test extracts the shipped loadSetups/storeSetups and drives the save/import cores over the __proto__/constructor/toString/ordinary matrix. --- pm-stack/aggregator/src/render.ts | 12 ++- .../aggregator/test/setups-store-2851.test.ts | 95 +++++++++++++++++++ 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 pm-stack/aggregator/test/setups-store-2851.test.ts diff --git a/pm-stack/aggregator/src/render.ts b/pm-stack/aggregator/src/render.ts index 41e3d65b90..30ab17d83a 100644 --- a/pm-stack/aggregator/src/render.ts +++ b/pm-stack/aggregator/src/render.ts @@ -4469,7 +4469,17 @@ const AA_EXPLORER_SCRIPT = `