Back to skill

Security audit

Data Harvester Pro

Security checks for vulnerabilities and agentic risk

Overview

This skill needs review because its batch command can read and print local file contents from any path the caller supplies.

Review before installing. Use this only in a sandbox or with a wrapper that restricts batch inputs to a dedicated URL-list directory; do not point it at sensitive local files. Treat the finance, news, comparison, and export outputs as mock or incomplete unless the publisher revises the implementation and documentation.

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

Warning
Location
data_harvester.py:170
Finding

Arbitrary Local File Read Through Unrestricted Batch File Path

Content
View full analysis

Vulnerability Details

File Location: data_harvester.py, lines 170–186
Vulnerability Type: Arbitrary local file read and information disclosure
Risk Level: Medium

Vulnerable Code:

python
filepath = args[0]
print(f"📦 批量抓取: {filepath}")
print("\n⚠️ 此功能需要:")
print("  1. 创建一个文本文件,每行一个URL")
print("  2. 使用浏览器自动化抓取")
print("  3. 支持自定义CSS选择器")

# 尝试读取文件
try:
    with open(filepath, 'r') as f:
        urls = [line.strip() for line in f if line.strip()]
    print(f"\n✅ 找到 {len(urls)} 个URL:")
    for url in urls[:5]:
        print(f"  - {url}")
    if len(urls) > 5:
        print(f"  ... 还有 {len(urls)-5} 个")

Technical Analysis

The batch command takes its file path directly from raw command arguments and passes it to open() without validating or restricting the path. There is no canonical-path check, permitted base directory, file-extension restriction, symlink protection, regular-file verification, or content validation.

Although this command is documented as accepting a text file containing URLs, any file readable by the Python process can be supplied. The implementation reads every nonempty line into memory and then returns the first five nonempty lines through command output. This creates both an information-disclosure risk and a potential resource-exhaustion condition when a very large or unusual file is selected.

Attack Path

  1. An attacker obtains the ability to provide arguments to the skill, directly or through prompt injection affecting a calling agent.
  2. The attacker invokes the batch command with a sensitive absolute or traversal-based path, such as batch /path/to/sensitive-file.
  3. The command passes the attacker-controlled path directly to open(filepath, 'r').
  4. The process reads the selected file using its own operating-system privileges.
  5. Up to five nonempty lines are printed into the tool output and become visible to the caller.
  6. The attack ...[truncated 791 chars]
Remediation
View remediation

Remediation Suggestions

  • Store accepted batch files in a dedicated, non-sensitive workspace directory.
  • Resolve the requested path with Path.resolve() and verify that it remains beneath the permitted directory.
  • Reject absolute paths, traversal sequences, symlinks, directories, device files, pipes, and other non-regular files.
  • Apply an explicit file-size limit before reading and process input incrementally rather than loading the entire file into memory.
  • Require an approved file extension where appropriate.
  • Validate each input line as an http or https URL before accepting or displaying it.
  • Avoid echoing file contents unless the output is necessary for the command.
  • Run the skill under a dedicated least-privilege account that cannot access secrets or unrelated user files.
  • Handle PermissionError, OSError, decoding failures, and oversized input safely without exposing sensitive path details.

T08 · Insecure Dependencies

Note
Location
data_harvester.py:205
Finding

Unpinned Third-Party Package Installation Instruction

Content
View full analysis

Vulnerability Details

File Location: data_harvester.py, line 205
Vulnerability Type: Unpinned dependency installation and supply-chain exposure
Risk Level: Low

Vulnerable Code:

python
print("  1. 安装 openpyxl: pip install openpyxl")

Technical Analysis

The skill instructs users to install openpyxl directly from the package index without specifying a reviewed version, lockfile, integrity hash, or trusted package source. The command therefore resolves to whichever package release and transitive dependencies are available at installation time.

The skill does not automatically execute this installation command, so exploitation requires a user or automation system to follow the printed instruction. Nevertheless, the recommendation creates a non-reproducible dependency path and unnecessarily exposes users to future package compromise, malicious dependency replacement, or an unexpectedly vulnerable release.

Attack Path

  1. A user invokes the export command.
  2. The skill prints the instruction pip install openpyxl.
  3. The user or an automated environment executes the suggested command.
  4. pip retrieves the currently selected package release and its dependencies from the configured package index.
  5. If the package source, selected release, account, or transitive dependency has been compromised, installation may execute attacker-controlled build or installation logic with the invoking user's privileges.

Impact Assessment

The skill itself does not install or import the package in the audited implementation. Consequently, immediate exploitability is limited and requires an external installation action.

If a compromised dependency is installed, the resulting code may execute with the privileges of the user or automation account running pip. The potential scope could include that account's files, credentials, Python environment, and accessible project data. System-wide impact would r ...[truncated 108 chars]

Remediation
View remediation

Remediation Suggestions

  • Declare dependencies in a reviewed project manifest rather than printing ad hoc installation commands.
  • Pin openpyxl and all transitive dependencies to reviewed versions through a lockfile.
  • Use package hashes, such as pip's --require-hashes workflow, to verify dependency integrity.
  • Install only from an approved and authenticated package index or internal mirror.
  • Regularly scan pinned dependencies for known vulnerabilities and update them through a controlled review process.
  • Use an isolated virtual environment and avoid privileged or system-wide package installation.
  • If export functionality remains unimplemented, remove the installation instruction until a reviewed dependency is genuinely required.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • 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 (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The manifest and documentation claim batch scraping and competitor analysis, but the detected behavior includes undeclared local file reading, unrelated stock/sector/fund lookups, and placeholder or hardcoded outputs. This mismatch is dangerous because users and automated systems may grant trust or permissions based on the stated purpose while the skill performs different actions.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · SKILL.md (reported line 3)May include surrounding context.

md
---
name: data-harvester-v2
description: Batch web scraping for competitor analysis, price monitoring and market research
command-dispatch: tool
command-tool: data_harvester
command-arg-mode: raw
metadata: {"openclaw": {"emoji": "🧑‍🌾", "requires": {"bins": ["python3"]}}}
---

# 🧑‍🌾 Data Harvester - Batch Scraping & Competitor Analysis

Professional-grade batch web scraping tool for competitor monitoring, price tracking, and market research.

## Features

- **Batch URL Scraping**: Process multiple URLs from file
- **Competitor Comparison**: Compare products across platforms
- **Stock Data**: Real-time stoc

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises a tool-driven workflow that reads local files and performs network access, but it does not declare any explicit tool scope such as allowed-tools or permissions. This weakens least-privilege controls and can cause the agent or user to invoke broader file and network capabilities than are apparent from the manifest.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill describes batch scraping and export features without a clear warning that it may ingest external content and write collected data to local files. In an agent environment, missing disclosure can lead to unintentional collection, storage, or propagation of sensitive or regulated data.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The top-level docstring labels the file as a data harvester for competitor monitoring and collection, which implies real acquisition of external data. In practice, the functions return embedded sample datasets and the scraping/export features are only instructional text, creating a direct contradiction between documentation and behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code file includes user-facing natural-language descriptions entirely in Chinese, including the primary tool description. Under the policy rule, forcing a specific language without user opt-in or a documented region-specific justification is a language/locale policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes a web-scraping skill focused on competitor analysis, price monitoring, and market research. However, the code primarily implements hard-coded stock quotes, sector data, and fund-flow outputs, which are finance lookup features rather than web scraping or competitor-price harvesting.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

A user would reasonably expect the skill to perform batch scraping, especially given the manifest description. Instead, the batch handler only opens a local text file, lists URLs, and states that browser automation and selectors are needed, without performing any scraping.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.