Back to skill

Security audit

Financial News

Security checks for vulnerabilities and agentic risk

Overview

This skill looks more like a mock financial-news demo than a real monitoring tool, and it could mislead users into believing current news, alerts, or sentiment analysis are active.

Install only if you understand this as a demonstration, not as a real financial-news monitor. Do not rely on its outputs for trading, alerts, sentiment analysis, or time-sensitive market decisions unless the publisher replaces the mock data with real sourced retrieval and makes monitoring behavior explicit.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

other

Warning
Location
scripts/news_monitor.py:42
Finding
Fabricated Financial Results and False Operation Success## Vulnerability Details **File Location**: `scripts/news_monitor.py:42-112` **Vulnerability Type**: Deceptive financial data and unimplemented functionality **Risk Level**: Medium ### Evidence The news query accepts filtering parameters but prints fixed stories and statistics: ```python def query_news(date=None, stock_code=None, industry=None): """ Query news """ print_header(f"📰 财经新闻 - {date or datetime.now().strftime('%Y-%m-%d')}") print(f"{Colors.BOLD}【宏观新闻】{Colors.ENDC}") print(f"1. 央行宣布降准 0.25 个百分点") print(f" 来源:央视新闻 时间:09:00") print(f" 影响:{Colors.OKGREEN}🟢 利好股市{Colors.ENDC}") print() print(f"2. 一季度 GDP 同比增长 5.2%") print(f" 来源:国家统计局 时间:10:00") print(f" 影响:{Colors.OKGREEN}🟢 利好经济{Colors.ENDC}") print() print(f"{Colors.BOLD}【公司新闻】{Colors.ENDC}") print(f"3. 贵州茅台发布 2025 年年报") print(f" 来源:上交所 时间:18:00") print(f" 影响:{Colors.OKGREEN}🟢 净利润增长 18%{Colors.ENDC}") print() print(f"4. 五粮液拟投资 100 亿扩产") print(f" 来源:公司公告 时间:16:00") print(f" 影响:{Colors.OKGREEN}🟢 产能提升{Colors.ENDC}") print() print(f"{Colors.BOLD}【行业新闻】{Colors.ENDC}") print(f"5. 白酒行业迎来新一轮涨价潮") print(f" 来源:证券时报 时间:14:00") print(f" 影响:{Colors.OKGREEN}🟢 行业利好{Colors.ENDC}") print() print(f"6. 监管部门加强食品安全检查") print(f" 来源:市场监管总局 时间:11:00") print(f" 影响:{Colors.WARNING}🟡 中性影响{Colors.ENDC}") print() print(f"{Colors.BOLD}【统计】{Colors.ENDC}") print(f"今日新闻:156 条") print(f"{Colors.OKGREEN}🟢 利好:89 条{Colors.ENDC}") print(f"{Colors.WARNING}🟡 中性:52 条{Colors.ENDC}") print(f"{Colors.FAIL}🔴 利空:15 条{Colors.ENDC}") print_success("新闻查询完成!") ``` Monitor setup only echoes parameters and reports success without creating persistent state, scheduling checks, or configuring notifications: ```python def setup_monitor(stock_code=None, industry=None, keyw ...[truncated 3396 chars]
Remediation
## Remediation Suggestions 1. Clearly label the current implementation and every generated record as demonstration data until live functionality exists. 2. Implement authenticated retrieval from an authoritative news provider and validate provider responses before presenting them. 3. Apply `date`, `stock_code`, and `industry` as real query filters. Return an explicit error when a filter cannot be supported. 4. Include source URLs, provider identifiers, retrieval timestamps, publication timestamps, and freshness information with every story. 5. Replace hard-coded aggregate counts with values calculated from the retrieved dataset. 6. Implement durable monitor storage, a scheduler or worker, notification delivery, retry handling, and observable delivery status before reporting monitor setup as successful. 7. Replace the constant sentiment result with a documented model or deterministic analysis method. Return model provenance, confidence-calculation details, and an error when analysis cannot be performed. 8. Return structured data rather than relying exclusively on terminal output so downstream agents can distinguish data, warnings, demonstration content, and failures. 9. Add tests proving that different dates, stock codes, industries, keywords, and input texts affect results as expected. 10. Remove the unused `TUSHARE_TOKEN` requirement if no integration will be implemented, or securely consume it without logging or exposing its value.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
描述强调的是一个真实的财经新闻监控技能,应具备新闻追踪、自动推送、重要新闻提醒等功能。但代码没有网络请求、定时任务、消息通知、外部数据源接入或持久化配置,仅在控制台输出预设新闻内容和设置提示,属于演示性质而非实际监控系统。因此其实际行为与声明的核心能力存在明显不符。

Vague Triggers

High
Confidence
97% confidence
Finding
The trigger phrase "新闻监控" is extremely broad and lacks domain restriction, making accidental invocation likely across many non-financial scenarios. Because the skill advertises monitoring and automated behavior, an overly broad trigger could result in unintended persistent workflows, external API usage, or confusing alert-related behavior if the skill is later fully implemented.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
Natural-language content throughout the file appears to assume Chinese as the required interaction language. There is no indication that the user can choose another language, nor any documented reason that the skill must be Chinese-only.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger phrase "公司新闻" is broad enough to match many ordinary user requests, which can cause unintended skill invocation. In an agent ecosystem, overbroad routing can misdirect user queries to a skill that may request external data access or produce misleading financial outputs without the user explicitly intending to use it.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger phrase "行业新闻" is highly generic and may activate on requests unrelated to financial monitoring. This increases the chance of unintended execution, user confusion, and unnecessary access to configured external services such as Tushare-backed data retrieval in contexts where the user did not request that behavior.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
Advertising automatic push notifications and monitoring without disclosing ongoing alerts, background activity, or external data access requirements can undermine informed user consent. If implemented later, users may unknowingly enable recurring processing or third-party data access, which creates privacy, billing, and trust risks.

Natural-Language Policy Violations

Medium
Confidence
86% confidence
Finding
This code file contains user-facing docstrings and console output exclusively in Chinese, which can amount to a language/locale policy violation when no user opt-in or locale selection is provided. The file does not indicate that it is a region-specific or Chinese-only tool, nor does it offer an alternative language.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill metadata promises live financial news tracking, auto-push, and important-news alerts, but the implementation only prints hard-coded sample content and never performs real monitoring or notification. In a financial context, this is dangerous because users may rely on the claimed functionality for time-sensitive decisions and miss critical market-moving events.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The setup_monitor function gives the impression that monitoring has been configured, but it only echoes parameters and prints a success message. This creates a false sense of protection and can cause users to believe alerting is active when no monitoring or notification backend exists.

Intent-Code Divergence

Low
Confidence
92% confidence
Finding
The query_news function is described as querying financial news, but it emits static prewritten headlines rather than obtaining current data from a source. In a finance-oriented skill, stale or fictitious output can mislead users into treating demo content as real market information.

Static analysis

No suspicious patterns detected.