T09 · Insecure Skill Coding Practices
- Location
scripts/fusion_search.py:157- Finding
Unrestricted Server-Side Navigation Enables SSRF
- Content
View full analysis
{ for (const s of document.querySelectorAll( 'script, style, nav, header, footer, .ad, .sidebar, ' + '.comment, .popup, .modal, .cookie, .advertisement, ' + 'noscript, iframe, .related, .recommend, .share' )) s.remove(); }""") # 优先找主要内容区域 content = page.evaluate("""() => { const main = document.querySelector('article, main, .content, ' + '.post, .article, #content, #main, .entry-content, ' + '.post-content, [role="main"]'); if (main) return main.innerText; return document.body ? document.body.innerText : ''; }""") content = re.sub(r'\s+', ' ', content).strip() return content[:8000] except Exception: return "" ``` The URL is taken directly from search results: ```python for i, r in enumerate(results[:count]): content = fetch_full_content(page, r["url"], timeout=10000) if content: results[i]["content"] = content ``` ### Technical Analysis The full-content extraction feature navigates to search-result URLs without validating: - The URL scheme - The destination hostname - The resolved IP address - Redirect destinations - Loopback, private, link-local, or reserved address ranges - Cloud metadata endpoints - DNS ...[truncated 2264 chars]- Remediation
View remediation
