T09 · Insecure Skill Coding Practices
- Location
smart_research.py:1055- Finding
Unrestricted URL Fetching Enables SSRF and Disclosure of Sensitive URLs to Third Parties
- Content
View full analysis
FetchResult: """ 多级降级抓取 降级顺序:crawl4ai → jina → markdown_new → defuddle → playwright """ fetchers = [ ("crawl4ai", fetch_crawl4ai, 15), ("jina", fetch_jina, 10), ("markdown_new", fetch_markdown_new, 8), ("defuddle", fetch_defuddle, 8), ("playwright", fetch_playwright, 30), ] last_error = None for name, fn, timeout in fetchers: logger.debug(f"[{name}] 尝试抓取: {url}") result = fn(url, timeout) if result.is_success: logger.info(f"[{name}] 成功抓取: {url} ({result.fetch_time_ms}ms)") return result last_error = result.error logger.debug(f"[{name}] 失败,降级: {last_error}") return FetchResult( url=url, success=False, error=last_error or "所有抓取方式均失败", fetcher_name="none", ) ``` The complete URL is subsequently embedded in requests to external services: ```python resp = requests.get( f"https://r.jina.ai/{url}", headers=headers, timeout=timeout, ) ``` ```python resp = requests.get( f"https://markdown.new/{url}", headers={ "Accept": "text/markdown", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/53 ...[truncated 3409 chars]- Remediation
View remediation
