From 810b2b4f1e88aa129fa10925e2be767734d5b06a Mon Sep 17 00:00:00 2001 From: ShadowDara Date: Wed, 9 Sep 2026 16:23:56 +0200 Subject: [PATCH] Potential fix for code scanning alert no. 4: Prototype-polluting function Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- finder-template-generator-ssg/src/configeditor/editor.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/finder-template-generator-ssg/src/configeditor/editor.tsx b/finder-template-generator-ssg/src/configeditor/editor.tsx index 37863eb7..d2ed7635 100644 --- a/finder-template-generator-ssg/src/configeditor/editor.tsx +++ b/finder-template-generator-ssg/src/configeditor/editor.tsx @@ -117,6 +117,9 @@ export function setupConfigEditor( function setPath(obj: any, path: string, value: unknown) { const parts = path.split("."); + const blockedKeys = new Set(["__proto__", "constructor", "prototype"]); + if (parts.some((part) => blockedKeys.has(part))) return; + let cur = obj; for (let i = 0; i < parts.length - 1; i++) { const p = parts[i];