Back to skill

Security audit

每日热榜

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a hot-news aggregation skill, but it needs review because it installs mutable Python dependencies, stores local data with unsafe path handling, and claims scheduled Feishu pushes without clear controls.

Review this skill before installing. Run it under a low-privilege account or isolated virtual environment, pin and hash dependencies, disable or tightly scope auto-save if history retention is not wanted, and do not expose the storage APIs to arbitrary source or date inputs. Treat the Feishu scheduled-push feature as under-specified until the package documents explicit opt-in, recipient confirmation, cancellation, and data contents.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
config.py:53
Finding

Path Traversal in Local History Storage

Content
View full analysis
str: """获取数据文件路径""" import os from datetime import datetime if not date_str: date_str = datetime.now().strftime("%Y-%m-%d") data_dir = self.data_dir if source_id: # 按热榜源分目录存储 source_dir = os.path.join(data_dir, source_id) os.makedirs(source_dir, exist_ok=True) return os.path.join(source_dir, f"{date_str}.json") else: # 主目录 os.makedirs(data_dir, exist_ok=True) return os.path.join(data_dir, f"all_{date_str}.json") ``` The resulting path is used by the following write operation: ```python def save_hot_list(self, source_id: str, data: Dict[str, Any]) -> bool: """ 保存热榜数据到文件 Args: source_id: 热榜源 ID(如 weibo, zhihu) data: 热榜数据字典 Returns: 是否保存成功 """ if not self.auto_save: return False try: # 获取今日日期的文件路径 file_path = config.get_data_path(source_id) # 构建存储结构 storage_data = { "source_id": source_id, "save_time": datetime.now().isoformat(), "update_time": data.get("update_time", ""), "total": data.get("total", 0), "data": data.get("data", []) } # 读取现有数据(如果有) existing_data = [] if os.path.exists(file_path): with open(file_path, 'r', encoding='utf-8') as f: try: existing_data = json.load(f) if not isinstance(existing_data, list): existing_data = [] except: existing_data = [] # 添加新数据到列表 ...[truncated 3565 chars]
Remediation
View remediation
str: root = Path(self.data_dir).resolve() root.mkdir(parents=True, exist_ok=True) if source_id not in HOT_SOURCES: raise ValueError("Unsupported source identifier") if not date_str: date_str = datetime.now().strftime("%Y-%m-%d") parsed_date = datetime.strptime(date_str, "%Y-%m-%d") safe_date = parsed_date.strftime("%Y-%m-%d") source_dir = (root / source_id).resolve() if source_dir.parent != root: raise ValueError("Invalid source path") source_dir.mkdir(parents=True, exist_ok=True) target = (source_dir / f"{safe_date}.json").resolve() if target.parent != source_dir: raise ValueError("Path escapes the source directory") return str(target) ``` 4. Keep directory creation out of read-only path resolution. A load operation should not mutate the filesystem. 5. Apply the same containment validation to direct path construction in `load_history()`, `get_saved_dates()`, and cleanup routines. 6. Add tests covering absolute paths, `../`, nested traversal, path separators, malformed dates, and symbolic links. 7. Run the Skill under a dedicated low-privilege account with write access only to its intended data directory. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:13
Finding

Unpinned Third-Party Dependencies in Automatic Installation

Content
View full analysis
=2.28.0 aiohttp>=3.8.0 # 可选依赖(用于测试) pytest>=7.0.0 pytest-asyncio>=0.20.0 ``` ### Technical Analysis The automatic installation command installs `requests` and `aiohttp` without exact version constraints or integrity hashes. The requirements file also uses open-ended minimum-version constraints and includes test-only packages in the general dependency set. As a result, installation is not reproducible: the exact code installed depends on package-index state and dependency resolution at installation time. A future compromised release, compromised transitive dependency, or incompatible version can enter the Agent environment without a corresponding change to the reviewed Skill package. No evidence was found that the current package names are typosquatted or that the project intentionally uses an untrusted package index. This finding concerns the unsafe installation policy rather than a confirmed malicious dependency. ### Attack Path 1. An operator installs the Skill using the declared `exec` installation step or the open-ended requirements file. 2. `pip` resolves the latest versions satisfying the unconstrained or lower-bounded specifications. 3. An upstream package or transitive dependency is compromised, or a future release introduces unsafe installation or runtime behavior. 4. The compromised package is downloaded without a lock file or expected hash verification. 5. Package installation code runs with the privileges of the account installing the ...[truncated 767 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (50)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

声明描述聚焦于通用热榜查询、定时推送和分类浏览;而代码实际公开的是一组明显超出该描述范围的扩展能力,尤其包括个性化订阅、跨平台聚合和舆情监控等。这些并非单纯的实现细节,而是独立功能域。虽然行业热榜与分类浏览、跨平台聚合与多平台热榜存在一定相关性,但整体上代码呈现的是比声明更广泛的产品能力集合,属于未充分声明的功能扩展。因此应判定为描述与行为存在不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个覆盖54个平台、支持定时推送和分类浏览的完整每日热榜技能;而代码仅展示了其中一个跨平台聚合子模块,主要行为是拉取若干预设平台数据并生成统一TOP10榜单。虽然这与“热榜查询”方向相关,但关键能力存在明显不一致:平台覆盖数量不符、缺少定时推送、缺少分类浏览,且代码的主要目的偏向聚合排行而非完整多平台浏览技能。因此描述未被该代码片段准确代表,构成不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

声明强调的是跨54个平台的热榜查询、定时推送和分类浏览;但这段代码主要负责请求路由和菜单展示,聚焦于三个功能模块:新闻摘要、行业热榜、个性化订阅。分类浏览与热榜主题大体相关,但代码中新增了“个性化订阅/偏好配置”这一声明未明确提到的能力。同时,声明中的关键能力——具体的平台级热榜查询和定时推送——在本代码块中都没有得到体现。虽然这可能只是主入口文件、具体能力可能在其他文件中实现,但仅就所提供代码块来看,描述与实际行为存在明显不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

该代码与声明有部分相关性,都是围绕“热榜数据”查询与展示,但实际实现的核心是垂直行业热榜,而不是通用的多平台每日热榜技能。代码通过预定义的10个行业到平台的映射来工作,重点在行业选择、行业筛选、合并去重和按行业展示;这与声明中强调的跨54个平台统一查询、分类浏览以及定时推送并不一致。尤其“定时推送”完全未实现,属于明显的描述超出代码行为。因此应判定为描述与实际行为存在实质性不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

描述与代码部分吻合:代码确实围绕多平台热榜数据进行分类浏览与聚合展示,也涉及接近54个平台的映射与抓取思路。但存在实质性不一致:声明中强调“支持定时推送”,而代码仅提供按用户输入解析标签、抓取、筛选、合并和格式化输出的流程,没有任何定时触发、订阅、消息推送或调度实现。因此描述夸大了已实现能力。另一个差异是,代码更像一个按标签进行新闻摘要聚合的子模块,而不是完整的“每日热榜技能”总实现。综合判断为存在描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

描述与代码存在明显不一致。声明强调的是一个覆盖54个平台的“每日热榜”查询技能,并支持“定时推送和分类浏览”。但该代码块的核心职责是个性化订阅:提供配置选项、从用户输入中提取关键词/平台/排除词、将配置持久化到本地JSON文件、再按这些偏好过滤热榜结果。虽然代码确实包含热榜数据获取能力,但它依赖外部api_client,且只围绕个性化过滤展示展开,并没有实现描述中的54个平台覆盖、定时推送或分类浏览。更重要的是,代码引入了未在声明中体现的本地配置存储能力。因此应判定为描述与实际行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的核心能力是多平台每日热榜查询,以及定时推送和分类浏览;而代码的核心目标明显是舆情监控。它会先抓取多个平台热榜,再围绕特定关键词进行过滤、排序和结果展示,这属于主题/关键词监控而不是通用热榜浏览。代码中也没有实现定时推送或分类浏览逻辑。虽然两者都涉及“热榜数据”,但主要用途发生了实质性偏移:声明是热榜聚合查询,代码是关键词舆情监测,因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The README describes ongoing keyword monitoring and scheduled push behavior without clearly disclosing persistence, outbound messaging, retention, or consent boundaries. For a skill that monitors user-defined topics and may send notifications to external platforms, missing privacy and data-flow warnings can cause users to enable surveillance-like features without understanding what is stored, when checks occur, or where notifications are sent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

At L231 the documentation promises active notification behavior ('我会立即通知您'). In the provided file, the examples and described interface only demonstrate configuring monitoring and querying settings, so the documentation asserts a stronger operational behavior than is evidenced here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

Lines L247-L249 state a concrete push channel and automated delivery outcome ('推送方式:飞书消息', '会自动推送'). In this file, that behavior is presented as an effect without corresponding code or setup details, creating an intent/behavior contradiction in the documentation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes the skill as querying hot-list data across platforms, with scheduled push and category browsing. This README claims additional behaviors such as automatically saving history, personalized subscriptions, cross-platform aggregation, and sentiment monitoring, which materially expand the skill’s functional scope beyond the manifest description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The scheduled push feature describes ongoing automated outbound delivery without prominently warning users that messages will be sent automatically to an external destination. In an agent setting, this can create privacy and abuse risks if users do not understand that monitoring terms or hot-topic content may be forwarded repeatedly after initial setup.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The README makes a reassuring privacy claim that user data is stored locally and not uploaded to the cloud, while elsewhere describing backend API access and Feishu push delivery. This inconsistency can mislead users about where data goes, causing them to disclose queries, preferences, or monitoring terms under false assumptions about privacy boundaries.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares executable install steps, local data storage, and network access, but does not explicitly scope or constrain its permissions. That makes the effective capability set broader and less auditable, increasing the risk of unexpected file, environment, or network operations once the skill is installed or run.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill states that hotlist data is automatically saved locally and retained over time, but the description does not present that as a clear user warning or consent-relevant notice. Silent persistence can expose browsing interests, query history, or operational data to other local users/processes and undermines informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Scheduled automatic pushes to Feishu introduce outbound data transfer and integrity/privacy risks, especially if content is pushed without explicit confirmation, recipient validation, or auditability. Users need a clear warning that data may be sent automatically to an external messaging platform on a schedule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language user-facing descriptions and labels in Chinese, beginning with the module docstring and continuing throughout comments and source names, but does not indicate that the skill is intentionally China/Chinese-locale specific or provide any opt-in for language preference. The policy requires flagging language or locale constraints when they are forced without user choice or clear justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code includes natural-language content that fixes the skill's documentation and responses to Chinese, such as the module docstring and later response strings. Under the policy, forcing a specific language without user choice is a locale/language policy violation unless clearly justified, which is not documented here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The response formatter returns fixed Chinese strings like '暂无热点数据' and '跨平台热点TOP10' for all users. This enforces a specific language in user-visible output without offering a language or locale choice, which matches the policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

All routing keywords, menu text, and examples are hard-coded in Chinese, so intent detection depends on Chinese terms and does not offer a language or locale choice. This can violate language/locale policy when a skill forces a specific language without user opt-in or explicit justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file consistently emits Chinese-language user-facing strings, such as category labels, status messages, and errors, with no indication that users can opt into another language. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module description and all user-facing prompts are written in Chinese, and the interaction flow assumes Chinese-language input such as Chinese industry names and examples. This imposes a specific language/locale on users without any opt-in or documented justification, which matches the language policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Natural-language strings and instructions in the module are entirely in Chinese, and the behavior explicitly guides users through Chinese-language tag selection. There is no indication that the user can opt into another language or that the locale restriction is documented as an intentional region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module description and user-facing text are written in Chinese and the request parsing logic relies on Chinese trigger words such as 热榜, 配置, 设置, and 偏好. This effectively imposes a specific language/locale for use without any opt-in or documented justification for a locale-specific restriction.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes a news hot-list skill focused on querying rankings across platforms and supporting push/browsing workflows. This file implements durable local storage of per-user preferences by reading and writing personalized_config.json, which is a separate stateful capability not mentioned in the manifest description.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.