other
Warning
- Location
- scripts/auto-research.py:290
- Finding
- Synthetic Research Results Are Presented as Successfully Retrieved Platform Data<![CDATA[ ## Vulnerability Details **File Location**: `scripts/auto-research.py:290-380` **Vulnerability Type**: Fabricated research output and misleading provenance **Risk Level**: Medium ### Vulnerable Code ```python async def _multi_platform_search(self, platform_configs: List[Dict], keywords: Dict) -> List[ContentItem]: """Multi-platform parallel search""" results = [] # Sort by relevance and search high-relevance platforms first sorted_configs = sorted(platform_configs, key=lambda x: x['score'], reverse=True) for cfg in sorted_configs: platform = cfg['name'] count = cfg['fetch_count'] lang = "zh" if platform in ["Zhihu", "CSDN", "Juejin", "Bilibili", "Xiaoyuzhou", "WeChat"] else "en" items = self._simulate_search(platform, keywords[lang], count) results.extend(items) # Update statistics stats = self.platform_stats[platform] stats.fetched_count = len(items) print(f" ✓ {platform}: {len(items)} items") return results def _simulate_search(self, platform: str, keywords: Dict, count: int) -> List[ContentItem]: """Simulate search results (a real API should be called in production)""" items = [] core_word = keywords["core"][0] # Platform-specific fixed title templates are selected here. template_list = templates.get(platform, [f"{core_word} content"]) for i in range(min(count, len(template_list) * 3)): title = template_list[i % len(template_list)] level = self.classifier.classify_level(title) content_type = self.classifier.classify_type(platform) item = ContentItem( title=title, url=f"https://example.com/{platform.lower()}/{i}", platform=platform, content_type=content_type, language="zh" if platform in ["Zhihu", "CSDN", "Juejin", "Bilibili", "Xiaoyuzhou", "WeChat"] else "en", level=level, quality_score=round(0.7 + (i % ...[truncated 2962 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace `_simulate_search()` with the documented browser or approved API implementation. 2. Preserve verifiable provenance for every result, including the final URL, retrieval time, platform, and retrieval status. 3. Validate that retrieved URLs use the expected platform domain before assigning a platform label. 4. Do not assign a successful fetch count until content has actually been retrieved and validated. 5. Derive quality scores from documented criteria and retain the evidence used to calculate each score. 6. Extract publication dates and authors from source content; use an explicit `unknown` value when unavailable. 7. Clearly label fixture or demonstration data as simulated and prevent it from entering production reports. 8. Add an execution mode field such as `data_mode: live|fixture`, and display it prominently in generated reports. 9. Add automated tests that fail if production reports contain `example.com` sources or simulated metadata. 10. Reconcile `README.md`, `SKILL.md`, and `OVERVIEW.md` with the implementation so operational claims accurately describe current behavior. ]]>
