Back to skill

Security audit

Farmland Weed Identification | 农田杂草识别与密度评估

Security checks for vulnerabilities and agentic risk

Overview

The scanners report that this skill’s account, credential, video-analysis, and report-history behavior does not clearly match its advertised weed-image analysis purpose, so ClawHub classifies it as suspicious with high confidence.

Consider the suspicious verdict carefully before installing. The scanners report account creation and token storage, local media upload, and behavior that may run even when export-only is requested. Some imported service capabilities could not be confirmed, and the overall scan was partial because a referenced local path was missing.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/smyx_farmland_weed_identification_analysis.py:60
Finding

CLI initialization discards the upstream sender identity and authenticates as the workspace default account

Content
View full analysis

Impact

Under these shared-workspace conditions, a requester receives the default account's report records and links rather than their own. Analysis submissions can likewise be associated with the wrong account. This does not require a server-side authorization bypass because the client supplies the default account's valid credentials.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (27)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied chunk implements user-account database infrastructure rather than image processing, weed identification, density estimation, or heatmap generation. Database persistence can be a supporting implementation detail, but this chunk specifically manages user identities, personal information, and tokens without an evident connection to the declared agricultural task. These operations occur when the DAO is instantiated or its methods are called; the chunk does not demonstrate token exfiltration or automatic execution of the CRUD operations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The visible implementation does not carry out the declared agricultural image-analysis purpose. No external agent command actually runs because the command construction and subprocess call are commented out. Imported base and API-service implementations are not supplied, so their capabilities cannot be assessed; the mismatch finding is limited to the provided code.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The CLI explicitly describes itself as a video-analysis tool and documents MP4 inputs. It also exposes a history-listing operation backed by skill.get_output_analysis_list. The supplied code contains no visible weed-species identification, coverage-density estimation, or heatmap generation. Analysis is delegated to an imported implementation that was not supplied, so its exact output cannot be established; nevertheless, the visible video-analysis interface and user-associated history retrieval materially differ from the declared purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The supplied chunk contains no weed recognition, image-density analysis, or heatmap generation. Its generic formatting, polling, and workspace helpers could legitimately support such a skill and are not independently grounds for a mismatch. However, its persistent identity provisioning, remote account registration, credential-bearing requests, and billing integration introduce material account and resource access behavior not represented by the description. These capabilities occur when the relevant methods are called; this chunk alone does not establish that they execute during every skill invocation or that credentials are sent to an attacker.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

Generic AI-analysis endpoint configuration could support the declared purpose and is not itself a mismatch. However, DETAIL_EXPORT_URL explicitly references BASE_URL_HEALTH and /health/order/api/getReportDetailExport?id=, an inconsistent resource not explained by weed identification or heatmap generation. This chunk only defines configuration; it does not demonstrate an actual network request or report export. The absence of weed-analysis logic in a configuration file alone is not grounds for the mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The supplied code implements a generic media-analysis and report-management client. Its input messages explicitly describe videos, remote inputs are passed as videoUrl, and results are handled as generic or health-analysis responses. There is no visible weed-specific request configuration, species or coverage processing, or heatmap dataset construction. Analysis is delegated to imported API methods whose implementations are not supplied, so the backend's actual analytical capabilities cannot be confirmed. File reading, API submission, and polling are supporting implementation details rather than independent mismatches; the concern is the materially different visible workflow and additional report-history capability.

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: "smyx-farmland-weed-identification-analysis"
description: "Identifies weed species and coverage density from field top-view images, and outputs a weed distribution heatmap dataset to support precision weeding decisions. | 通过田间图像识别杂草种类与覆盖密度,生成除草建议区域热力图。"
version: "1.0.21"
license: "MIT-0"
---

# 🌾 Farmland Weed Identification & Density Assessment | 农田杂草识别与密度评估

> 通过田间图像识别杂草种类与覆盖密度,生成除草建议区域热力图。
>
> **精准除草决策中枢** · 田间图像智能分析 · 杂草种类识别 · 覆盖密度评估

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

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.

The --export-env-only option promises not to execute analysis, but analysis still runs.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The parser accepts --export-env-only, but execution never checks it before identity initialization, history retrieval, or analysis. A caller relying on the explicit no-analysis promise can unintentionally upload local media, submit remote processing, or incur service charges when also supplying an input.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · skills/smyx_analysis/scripts/skill.py (reported line 28)May include surrounding context.

python
result_json = JsonUtil.parse(result_json_pure_text, result_json_pure_text)

        result_json_common_ai_response = result_json.get("commonAiResponse") if isinstance(result_json,
                                                                                           dict) else result_json
        if result_json_common_ai_response:
            result_json = result_json_common_ai_response

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · skills/smyx_analysis/scripts/skill.py (reported line 33)May include surrounding context.

python
result_json = result_json_common_ai_response

        result_json_health_ai_response = result_json.get("healthAiResponse") if isinstance(result_json,
                                                                                           dict) else result_json
        if result_json_health_ai_response:
            result_json = result_json_health_ai_response

Local video contents are passed to the analysis API without disclosure of the upload.

Medium
Category
Output Handling
Confidence
86% confidence
Finding

The code reads the entire local file and passes its contents through the files argument to the analysis service. There is no confirmation, log, or comment explaining that the user's video is being transmitted; the comment only describes reading the file, leaving this privacy-relevant behavior undisclosed in the supplied code.

Content

No source excerpt is available for this finding.

The documented export-only option does not prevent analysis execution.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The export-only flag is parsed but never used to stop execution. With an input supplied, a supposedly non-executing invocation proceeds through identity resolution and media analysis, potentially transmitting private video or consuming paid resources.

Content

No source excerpt is available for this finding.

The service exposes username-based user lookup, an account-directory capability unrelated to weed identification or heatmap generation.

Medium
Category
Excessive Agency
Confidence
87% confidence
Finding

At L098-L101, get_user_by_username forwards a supplied username to a user-lookup utility. Looking up user accounts is not a direct requirement of analyzing field imagery, estimating weed coverage, or producing distribution heatmaps, and the manifest does not declare account-management functionality.

Content

No source excerpt is available for this finding.

The skill includes persistent user-profile and authentication-token management unrelated to weed identification.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

L448–L465 define a user table containing personal information, token, and open_token fields, and L470–L473 expose it through a DAO with inherited read, update, and delete operations. DAO initialization also creates and migrates this user table (L180–L214), so this is more than an unused model declaration. Managing user identities and authentication tokens is not justified by the manifest's image-analysis and weed-heatmap purpose.

Content

No source excerpt is available for this finding.

The ai_chat docstring claims to invoke an analysis agent and return results, but the implementation never invokes the agent.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The docstring at L25–L34 explicitly promises an openclaw agent invocation through subprocess and an analysis result or session ID. However, command execution is commented out at L61–L66, and the empty dictionary assigned at L68 raises an AttributeError at L70; the exception handler suppresses the failure, so the method returns None without performing the documented analysis.

Content

No source excerpt is available for this finding.

FileUtil.open silently truncates existing files without disclosing the destructive behavior.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

Opening a path in mode 'w' immediately truncates an existing file, even before the caller writes anything. This generic open helper has no docstring, comment, confirmation, or user-facing message explaining that behavior; exception tracing does not disclose successful truncation.

Content

No source excerpt is available for this finding.

The request helper silently provisions remote accounts and persists user credentials, beyond the declared weed-analysis workflow.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

An ordinary HTTP operation can implicitly call phoneLogin with silent registration enabled, transmit an identity, and save returned authentication tokens through UserDao. These undisclosed account and credential side effects exceed the advertised image-analysis workflow, and the identity can even originate from API_SECRET_KEY rather than a dedicated public identifier.

Content

No source excerpt is available for this finding.

HTTP requests can silently trigger remote user registration and persist returned authentication tokens.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The generic request helper hides remote registration and credential persistence behind a normal request, with no visible opt-in or separation from routine analysis. This can create an unwanted external account and retain reusable credentials when the user expected only weed-image processing.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The POST transmits the selected identity to a separate login endpoint as both openId and mobile, and the caller can select API_SECRET_KEY as that identity. External authentication is not inherently malicious, but unnecessarily placing a secret in identity fields can expose it to profile storage or identity logging; the supplied source does not establish the endpoint's trustworthiness.

Content

Scanner excerpt · skills/smyx_common/scripts/util.py (reported line 561)May include surrounding context.

python
"source": ConstantEnum.DEFAULT__SKILL_HUB_NAME
            }
            try:
                _response = requests.post(_url, json=_data)
                if _response.status_code == 200:
                    _response_json = _response.json()
                    if _response_json and _response_json.get("success"):

The automatic trigger includes the generic phrase “历史报告” (“historical reports”) without requiring a farmland or weed-analysis context.

Low
Category
Trigger Abuse
Confidence
92% confidence
Finding

The generic trigger '历史报告' can activate this skill for report requests unrelated to farmland analysis. Combined with the mandatory cloud-query instruction, this can cause unintended account-associated network requests and display agricultural history outside the user's intended task.

Content

No source excerpt is available for this finding.

Loading configuration silently creates directories and writes a configuration file.

Low
Category
Output Handling
Confidence
90% confidence
Finding

YamlUtil.load creates parent directories and writes a YAML file when the requested path does not exist, without a prompt, log, docstring, or explanatory comment disclosing this side effect. BaseEnum.init_subclass invokes this loader at L053 and L058, so defining configuration classes can modify the filesystem without an explicit save operation.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/dao.py (reported line 243)May include surrounding context.

python
username = getattr(model, "username", None)
            if username:
                column_names = self.__model__.__table__.columns.keys()
                update_data = {key: getattr(model, key) for key in column_names if key != "username"}
                return self.update_by_username(username, **update_data)

            return None

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/dao.py (reported line 353)May include surrounding context.

python
column_names = self.__model__.__table__.columns.keys()

            for key in column_names:
                value = getattr(model, key)
                setattr(instance, key, value)

            session.commit()

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/dao.py (reported line 326)May include surrounding context.

python
if filters:
                for key, value in filters.items():
                    query = query.filter(getattr(self.__model__, key) == value)

            if offset:
                query = query.offset(offset)