T09 · Insecure Skill Coding Practices
- Location
src/daily_fetch.py:378- Finding
Server-Side Request Forgery Through Unvalidated RSS Article URLs
- Content
View full analysis
100: return text[:config['output']['raw_content_length']] except Exception as e: logging.warning(f"[trafilatura] 抓取失败 {source_name}: {e}") # 备用:BeautifulSoup resp = fetch_with_retry(url, headers, timeout, max_retries, delay) ``` The URL is obtained from an RSS entry and passed directly to the vulnerable fetch routine: ```python for entry in feed.entries[:30]: title = entry.get('title', '').strip() url = entry.get('link', '') if not title or not url: continue # 检查时间 published = entry.get('published_parsed') or entry.get('updated_parsed') if published: pub_date = datetime(*published[:6]) if pub_date < cutoff_date: continue rss_summary = re.sub(r'<[^>]+>', '', entry.get('summary', '')) is_dup, article = deduplicator.is_duplicate(url, title, rss_summary) if is_dup: if article: items.append(article) ...[truncated 2827 chars]- Remediation
View remediation
