Back to skill

Security audit

螃蟹投研-股票行业Collector

Security checks for vulnerabilities and agentic risk

Overview

The skill does not appear malicious, but its implementation materially differs from its advertised stock-finance collection claims.

Review before installing if you need accurate financial metrics: this version likely will not return the advertised ROE, margin, debt, cash-flow, or growth fields. Run it in an isolated environment, expect outbound access to public stock-data APIs, and prefer pinned minimal dependencies.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:6
Finding

Unpinned and Unnecessary Third-Party Dependencies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 6
Vulnerability Type: Supply-chain exposure through unpinned dependencies
Risk Level: Medium

Vulnerable Code

yaml
metadata:
  {
    "openclaw": {
      "emoji": "📊",
      "requires": {"pip": ["baostock", "akshare", "pandas"]}
    }
  }

Technical Analysis

The skill declares baostock, akshare, and pandas without exact versions or package integrity hashes. Consequently, installation may resolve different package releases over time rather than a fixed, previously reviewed dependency set.

If a declared package, one of its transitive dependencies, or its release infrastructure is compromised, a future installation could retrieve attacker-controlled package content. Python packages may execute code during installation or when imported. The current implementation imports akshare and pandas; baostock is declared but not used, while the imported pandas module is also unused in the reviewed implementation. These unnecessary declarations increase the supply-chain attack surface without supporting current functionality.

The audit found no evidence that the named packages are presently malicious. The finding concerns the absence of version and integrity controls.

Attack Path

  1. An attacker compromises a declared package, a transitive dependency, or the associated package publishing account.
  2. The attacker publishes a malicious release under the legitimate package name.
  3. A new skill environment processes the unpinned pip requirements and resolves the malicious release.
  4. Attacker-controlled code runs during package installation or when the skill imports the affected module.
  5. The payload operates with the permissions of the process installing or executing the skill.

Impact Assessment

Successful exploitation could provide arbitrary code execution under the skill runner's operating-system account. The resul ...[truncated 409 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove baostock and pandas from the declared requirements unless they are required by supported functionality.
  2. Pin every direct dependency to an exact, reviewed version rather than allowing unconstrained resolution.
  3. Generate and maintain a lockfile that also fixes transitive dependency versions.
  4. Require package hashes during installation, such as through a hash-locked requirements file and pip install --require-hashes.
  5. Retrieve packages only from an approved repository and disable untrusted supplemental indexes to reduce dependency-confusion risk.
  6. Scan pinned packages for known vulnerabilities and review dependency updates before changing the lockfile.
  7. Install and execute the skill in a least-privileged, isolated environment without unnecessary credentials or filesystem access.
Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

该技能描述的重点是行业上市公司资料收集,尤其是一组明确列出的财务指标与控股股东持股比例。但代码实际只做了三件事:1)通过申万行业接口获取成分股;2)通过东方财富API抓取实时/当日行情与估值字段;3)通过 akshare 的前十大流通股东接口取第一条股东信息。最明显的不一致是:描述中列出的关键财务数据(ROE、毛利率、净利率、资产负债率、现金流、增长率)完全没有实现,这属于核心能力缺失。同时,代码还增加了描述未提及的每日交易数据和估值指标,超出了声明范围。虽然这些都与股票数据相关,但其主功能与声明存在实质偏差,因此应判定为不匹配。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

manifest 声称会收集 ROE、毛利率、净利率、资产负债率、现金流、增长率等财务数据,但 collect 流程只合并申万成分股基础信息、每日价格数据和控股股东信息,没有任何获取这些财务指标的函数或字段映射。该技能名称和描述强调“行业Collector”,但代码未兑现其核心财务数据收集承诺。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

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 presents its skill identity, docstrings, and user-facing runtime messages entirely in Chinese, which imposes a specific language on users without any opt-in or alternative. The policy explicitly calls for flagging language or locale constraints when the skill does not offer a choice or document a justified region-specific need.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

技能清单描述声明收集代码、名称、交易所、行业、财务数据以及控股股东信息,但模块说明和实现实际还抓取了每日交易数据(开盘/收盘/最高/最低、成交量、成交额)以及估值指标如PE、PB、流通市值。对于一个应按描述收集行业公司资料的技能,这属于对外宣称范围之外的数据扩展,而不是实现该目的所必需的细节。

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · __init__.py (reported line 19)May include surrounding context.

python
def _curl_api(self, url):
        """使用curl调用API"""
        try:
            result = subprocess.run(
                ['curl', '-s', '--max-time', '10', url],
                capture_output=True, text=True, timeout=15
            )