Back to skill

Security audit

Plant Leaf Disease Identification | 植物叶片病害特征识别

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because scanners report undeclared account, identity, and credential handling alongside remote media analysis, with incomplete evidence because one referenced path was missing.

Consider avoiding installation until the account and credential handling, media uploads, and export-only behavior are clarified. The scan is partial: one referenced path was missing, and some imported analysis behavior could not be verified.

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
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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (27)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The supplied chunk implements user-account database management rather than plant disease identification. Its sys_user model includes email, birthday, sex, age, token, and open_token fields, and its DAO supports persistent CRUD operations and default-user selection. No image processing, lesion detection, disease classification, or confidence scoring appears in the chunk. Database storage can be a legitimate supporting detail, but this account and token management capability has no demonstrated connection to the declared function. The chunk does not show network transmission or token use, and it cannot establish what other skill files do.

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 video analysis, requests MP4 inputs, and offers a video-history listing operation. The supplied code contains no visible leaf-image processing, lesion detection, disease classification, or confidence-score generation. Analysis is delegated to an imported implementation that is not provided, so its precise content cannot be verified; nevertheless, the visible video-oriented interface and history-retrieval capability materially differ from the declared plant leaf image diagnosis workflow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Generic formatting, polling, and HTTP helpers could support a disease-identification skill and are not themselves mismatches. However, this chunk also implements an undisclosed account-registration, credential-management, and payment-service workflow involving local files, database persistence, and external identity transmission. These are material capabilities beyond the declared image-diagnosis purpose. No image analysis, lesion detection, disease classification, or confidence scoring appears in this chunk. Because this is a shared utility module, that absence does not prove the complete skill lacks those features; the mismatch is grounded in the additional account and credential behaviors shown here. Most of these behaviors occur when the relevant methods are invoked, rather than automatically on import.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The visible implementation does not substantiate the declared plant-disease identification purpose. Its agent invocation is disabled and its result handling fails before producing output. Imported base classes and API services could contain additional functionality, but their implementations are not supplied, so disease-identification behavior cannot be established from this chunk. No active subprocess execution or other malicious capability is demonstrated.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The visible code explicitly requests local video paths or network video URLs and passes remote inputs using a videoUrl parameter. It also exposes a report-listing operation not described in the declared purpose. No visible logic identifies leaf symptoms, selects plant diseases, or ensures disease confidence scores are returned. Such processing could exist in the imported API service, whose implementation is not supplied, so the ultimate analysis domain cannot be established conclusively. File upload, polling, and report formatting alone are supporting implementation details, not evidence of a mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
84% confidence
Finding

The supplied chunk implements a general-purpose API client and exposes user lookup, but contains no image handling, lesion analysis, disease classification, or confidence scoring. HTTP and download helpers could support a larger diagnostic system and are not inherently suspicious; however, the username lookup is an additional capability not explained by the declaration. This assessment is limited to the supplied chunk and does not establish malicious behavior or show that disease-analysis functionality is absent elsewhere.

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-plant-leaf-disease-identification-analysis"
description: "AI-powered plant leaf disease identification from high-resolution leaf images. Detects disease lesion features (color, shape, distribution, surface deposits) such as white powdery patches (powdery mildew), rust-colored spore pustules (rust), brown necrotic spots (leaf spot), and outputs the most likely disease type with confidence score. Helps users quickly diagnose plant diseases and take timely measures. Scenarios: plant factories, greenhouses, home gardening, farm inspection. | 通过拍摄植物叶片的高清图像,利用AI视觉分析技术识别叶片上的病斑特征�

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 analysis workflow lacks a privacy warning about sending user-provided images or videos to an external API.

Medium
Category
Output Handling
Confidence
92% confidence
Finding

Although API usage is documented, the automatic analysis workflow does not clearly warn users that local media contents will leave their system or explain cloud retention. Plant images and videos can contain location metadata, people, or commercially sensitive greenhouse and farm details.

Content

No source excerpt is available for this finding.

The documented export-only mode still executes leaf-image analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The parser advertises --export-env-only as preventing analysis, but the parsed flag is never checked. When combined with an input or --list, execution still initializes identity and performs the requested remote operation, potentially uploading media contrary to the caller's explicit expectation.

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 input files are submitted to the analysis API without disclosure that their contents leave the local system.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The implementation reads the entire local file and passes its bytes to the analysis service without an upload-specific disclosure or authorization gate. Even plant media can expose embedded location metadata or sensitive background imagery, making undisclosed external transmission a privacy risk.

Content

No source excerpt is available for this finding.

The documented export-only option does not prevent analysis from running.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The --export-env-only flag is registered but never used to control execution. A caller providing media with this supposedly non-analysis option still reaches identity initialization and remote analysis, potentially causing unintended disclosure or service usage.

Content

No source excerpt is available for this finding.

The skill includes persistent user-profile and credential management unrelated to plant disease identification.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The user schema supports storing personal information and bearer credentials as ordinary SQLite strings, without field encryption or explicit restrictive file permissions in this source. A reader of the database or its backups could recover stored tokens; an authenticated service may justify account support, but leaf diagnosis does not itself justify retaining this breadth of data.

Content

No source excerpt is available for this finding.

ai_chat claims to invoke an AI agent and return analysis, but its implementation cannot do either.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The docstring at L26–L34 states that this method invokes openclaw agent through subprocess and returns analysis or a session ID. However, the invocation is commented out at L61–L66, and the empty dictionary assigned at L68 raises AttributeError on result.stderr at L70; the exception is caught, so the method returns None without performing analysis.

Content

No source excerpt is available for this finding.

FileUtil.open silently truncates existing files without disclosing its write-only behavior.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

The generically named open helper uses mode 'w', which immediately erases an existing file's contents. There is no docstring, explanatory comment, confirmation, or action log disclosing this destructive behavior; exception tracing only occurs if opening fails.

Content

No source excerpt is available for this finding.

The request helper silently registers remote user accounts, beyond the advertised leaf-disease identification workflow.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The helper explicitly requests silent registration and sends the selected identity as both openId and mobile to a remote login endpoint. Ordinary API use can therefore create an external account and disclose an identifier without a separate consent step, which is not apparent from the advertised leaf-identification purpose.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This POST transmits identity data during automatic registration, and the caller prioritizes API_SECRET_KEY as the username, so a configured API secret can become the openId and mobile payload. External processing may be legitimate for diagnosis, but forwarding a secret as registration identity is unnecessary and potentially exposes a reusable credential; the configured destination and transport are not visible here.

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"):

Ordinary HTTP requests can silently trigger remote account registration and local credential persistence.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

When credentials are unavailable, the general request wrapper can register a remote account and save returned tokens and user information locally. These hidden network and persistence side effects exceed normal request semantics and can expose credentials or create an account without informed authorization.

Content

No source excerpt is available for this finding.

The service provides a user-account lookup capability unrelated to plant leaf disease identification.

Low
Category
Excessive Agency
Confidence
88% confidence
Finding

The get_user_by_username method delegates a supplied username to a user-lookup utility. Looking up user accounts is not a direct requirement of analyzing leaf images or returning disease predictions, and the manifest does not declare account-management functionality.

Content

No source excerpt is available for this finding.

Loading configuration silently creates directories and writes a configuration file.

Low
Category
Output Handling
Confidence
91% confidence
Finding

YamlUtil.load creates missing directories and writes a YAML file without a comment, docstring, log, or confirmation disclosing this side effect. BaseEnum.init_subclass invokes this loader during class definition (L052–L058), so merely importing the module can modify the filesystem rather than only read configuration.

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)