T09 · Insecure Skill Coding Practices
- Location
scripts/crypto_advisor.py:301- Finding
Fabricated Market Data Presented as Live Search Results
- Content
View full analysis
Dict[str, Any]: """ 修复:不再硬编码 $77,800-$78,200 如果 Agent 传入真实价格,使用真实价格;否则显示占位符 """ now = datetime.now().strftime('%Y-%m-%d %H:%M:%S') if real_min and real_max: price_range = f"${real_min:,.0f} - ${real_max:,.0f}" else: price_range = "等待搜索数据(Agent 未传入真实价格)" return { "source": "联网搜索聚合", "data": { "symbol": symbol, "symbol_cn": "比特币" if symbol == "BTC" else ("以太坊" if symbol == "ETH" else symbol), "category": classify_coin(symbol)['category'], "price_range": price_range, "change_24h": "+1.2%", "market_summary": f"{symbol} 近期行情(请确认 Agent 已回填真实数据)", "key_news": ["ETF净流入5亿美元", "美联储官员讲话偏鹰"], "search_time": now }, "freshness_check": { "is_fresh": True, "search_time": now, "note": "基于联网搜索,非交易所原生实时撮合数据" }, "search_availability": { "status": "search_ok", "detail": "搜索服务正常" }, "data_quality": { "source_tier": "tier2", "confidence": "medium", "cross_verified": False }, "server_time": now, "timezone": "北京时间 (UTC+8)", "delay_note": "搜索聚合行情,延迟约 1-5 分钟(非交易所原生毫秒级数据)", "boundary": "仅信息搜索与截图分析,不支持直接交易/下单/合约操作", "disclaimer": "仅信息整理与技术分析,不构成投资建议。用户需自行承担决策责任。", "screenshot_prompt": "如需精准技术分析,请发送交易所APP实时截图" } ``` ### Technical Analysis The function is advertised as a network-backed cryptocurrency search tool, but it performs no network request and does not consume search- ...[truncated 2170 chars]- Remediation
View remediation
