T09 · Insecure Skill Coding Practices
- Location
SKILL.md:102- Finding
Unconditional deletion of all content on the target Figma page
- Content
View full analysis
c.remove())` 2. Recreate design with changes 3. Notify user to re-run the plugin ``` All three executable examples implement the same operation. For example: ```js // Get the last page var pages = figma.root.children; var target = pages[pages.length - 1]; await figma.setCurrentPageAsync(target); // Clear old content var old = target.children.slice(); for (var i = 0; i < old.length; i++) old[i].remove(); ``` The design-system example contains: ```js var pages = figma.root.children; var target = pages[pages.length - 1]; await figma.setCurrentPageAsync(target); var old = target.children.slice(); for (var i = 0; i < old.length; i++) old[i].remove(); ``` The multi-screen example contains: ```js var pages = figma.root.children; var target = pages[pages.length - 1]; await figma.setCurrentPageAsync(target); var old = target.children.slice(); for (var i = 0; i < old.length; i++) old[i].remove(); ``` ### Technical Analysis The Skill directs generated plugins to select the last page in the current Figma d ...[truncated 2434 chars]- Remediation
View remediation
