T09 · Insecure Skill Coding Practices
- Location
scripts/main.ts:232- Finding
Unrestricted URL Navigation Enables Internal Resource Capture and Export
- Content
View full analysis
{ const chrome = findChromeExecutable(); if (!chrome) throw new Error("Chrome executable not found. Install Chrome or set NOTION_CLIPPER_CHROME_PATH env."); const profileDir = resolveNotionClipperChromeProfileDir(); await mkdir(profileDir, { recursive: true }); const args = [ `--remote-debugging-port=${port}`, `--user-data-dir=${profileDir}`, "--no-first-run", "--no-default-browser-check", "--disable-popup-blocking", ]; if (headless) args.push("--headless=new"); args.push(url); return spawn(chrome, args, { stdio: "ignore" }); } ``` ```ts // scripts/main.ts:259-289 console.log(`Fetching: ${args.url}`); console.log(`Mode: ${args.wait ? "wait" : "auto"}`); // Capture the web page const result = await captureUrl(args); console.log(`Title: ${result.metadata.title}`); // Convert markdown to Notion blocks console.log("Converting to Notion blocks..."); const contentBlocks = convertMarkdownToNotionBlocks(result.markdown); // Build final blocks array const blocks: NotionBlock[] = []; // Add bookmark block at the top if enabled if (args.includeBookmark) { blocks.push(createBookmarkBlock(args.url)); blocks.push(createDividerBlock()); } // Add content blocks blocks.push(...contentBlocks); // Save to Notion if (targetDatabaseId) { console.log("Creating page in Notion database..."); const page = await createPageInDatabase(apiKey, { databaseId: targetDatabaseId, title: ...[truncated 2868 chars]- Remediation
View remediation
