Back to skill

Security audit

Plant Growth Stage Detection | 植物生长阶段自动判定

Security checks for vulnerabilities and agentic risk

Overview

This skill is a cloud-backed plant analysis tool, but it also silently handles identity, account registration, token persistence, and risky Python import path setup that users should review before installing.

Install only if you are comfortable sending plant images/videos or supplied URLs to the lifeemergence.com cloud service and allowing the skill to create or reuse a local identity, query cloud report history, and store service tokens in a workspace SQLite database. Prefer a version that clearly documents account creation, token retention, cloud data handling, and removes the sys.path import hack.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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)

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/smyx_plant_growth_stage_detection_analysis.py:5
Finding

Shared Temporary-Directory Python Import Hijacking

Content
View full analysis

Vulnerability Details

File Location: scripts/smyx_plant_growth_stage_detection_analysis.py, lines 5–7
Vulnerability Type: Python module search-path hijacking
Risk Level: High

Vulnerable Code

python
current_dir = os.path.dirname(os.path.abspath(__file__))
parent_dir = os.path.dirname(os.path.dirname(os.path.dirname(current_dir)))
sys.path.insert(0, parent_dir)

Technical Analysis

The entry point derives an import root by traversing three parent directories from its own location and inserts that directory at index zero of sys.path. In the audited deployment layout, the script is located under:

text
/tmp/.../artifact/scripts/smyx_plant_growth_stage_detection_analysis.py

The calculated parent_dir is therefore /tmp. Placing this shared, locally writable directory first in Python's module search path allows modules located there to take precedence during subsequent imports, including:

python
from skills.smyx_common.scripts.util import RequestUtil, OpenIdUtil

A separate local user able to create files under /tmp could prepare a counterfeit skills package tree. When the victim invokes the documented Skill entry point, Python may import and execute the attacker's package initialization or module code in the victim process.

This is an exploitable trust-boundary violation because code controlled by another local account can be resolved as trusted Skill code. No evidence indicates that the project author intentionally introduced this behavior, so the project verdict remains suspicious, not malicious.

Attack Path

  1. The project is installed or staged in the audited temporary-directory layout.
  2. A local attacker with write access to /tmp, but without access to the victim account, creates a spoofed package such as /tmp/skills/__init__.py and the required nested module structure.
  3. The victim invokes the documented command:
    bash
    python -m scripts.smyx_plant_growth_stage_detection_analysis 
    

...[truncated 922 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the runtime sys.path modification and execute the entry point through normal package resolution from the trusted project root.
  2. Package and install the project using standard Python packaging mechanisms so imports do not depend on writable ancestor directories.
  3. If path bootstrapping is unavoidable:
    • Derive the exact expected project root rather than traversing a fixed number of parents.
    • Resolve and canonicalize the path with os.path.realpath.
    • Verify that it contains expected project markers.
    • Reject shared, temporary, or group/world-writable directories.
    • Avoid placing the path before trusted package locations.
  4. Deploy the Skill beneath a directory owned by the executing account and not writable by other users.
  5. Add a regression test that runs the entry point from representative installation paths and verifies that all skills.* modules resolve inside the trusted project directory.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (57)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The combination of generic HTTP/auth handling, open-id/API-key file usage, local user records, workspace management, and absence of visible image/CV logic strongly suggests undeclared identity and infrastructure behavior beyond the manifest. In this context, hidden identity resolution is especially sensitive because the skill also advertises cloud history queries and report linking, which could expose user-associated records.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The combination of generic HTTP/auth handling, open-id/API-key file usage, local user records, workspace management, and absence of visible image/CV logic strongly suggests undeclared identity and infrastructure behavior beyond the manifest. In this context, hidden identity resolution is especially sensitive because the skill also advertises cloud history queries and report linking, which could expose user-associated records.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The combination of generic HTTP/auth handling, open-id/API-key file usage, local user records, workspace management, and absence of visible image/CV logic strongly suggests undeclared identity and infrastructure behavior beyond the manifest. In this context, hidden identity resolution is especially sensitive because the skill also advertises cloud history queries and report linking, which could expose user-associated records.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The combination of generic HTTP/auth handling, open-id/API-key file usage, local user records, workspace management, and absence of visible image/CV logic strongly suggests undeclared identity and infrastructure behavior beyond the manifest. In this context, hidden identity resolution is especially sensitive because the skill also advertises cloud history queries and report linking, which could expose user-associated records.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The combination of generic HTTP/auth handling, open-id/API-key file usage, local user records, workspace management, and absence of visible image/CV logic strongly suggests undeclared identity and infrastructure behavior beyond the manifest. In this context, hidden identity resolution is especially sensitive because the skill also advertises cloud history queries and report linking, which could expose user-associated records.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The combination of generic HTTP/auth handling, open-id/API-key file usage, local user records, workspace management, and absence of visible image/CV logic strongly suggests undeclared identity and infrastructure behavior beyond the manifest. In this context, hidden identity resolution is especially sensitive because the skill also advertises cloud history queries and report linking, which could expose user-associated records.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The combination of generic HTTP/auth handling, open-id/API-key file usage, local user records, workspace management, and absence of visible image/CV logic strongly suggests undeclared identity and infrastructure behavior beyond the manifest. In this context, hidden identity resolution is especially sensitive because the skill also advertises cloud history queries and report linking, which could expose user-associated records.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The combination of generic HTTP/auth handling, open-id/API-key file usage, local user records, workspace management, and absence of visible image/CV logic strongly suggests undeclared identity and infrastructure behavior beyond the manifest. In this context, hidden identity resolution is especially sensitive because the skill also advertises cloud history queries and report linking, which could expose user-associated records.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The combination of generic HTTP/auth handling, open-id/API-key file usage, local user records, workspace management, and absence of visible image/CV logic strongly suggests undeclared identity and infrastructure behavior beyond the manifest. In this context, hidden identity resolution is especially sensitive because the skill also advertises cloud history queries and report linking, which could expose user-associated records.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The combination of generic HTTP/auth handling, open-id/API-key file usage, local user records, workspace management, and absence of visible image/CV logic strongly suggests undeclared identity and infrastructure behavior beyond the manifest. In this context, hidden identity resolution is especially sensitive because the skill also advertises cloud history queries and report linking, which could expose user-associated records.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The combination of generic HTTP/auth handling, open-id/API-key file usage, local user records, workspace management, and absence of visible image/CV logic strongly suggests undeclared identity and infrastructure behavior beyond the manifest. In this context, hidden identity resolution is especially sensitive because the skill also advertises cloud history queries and report linking, which could expose user-associated records.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The combination of generic HTTP/auth handling, open-id/API-key file usage, local user records, workspace management, and absence of visible image/CV logic strongly suggests undeclared identity and infrastructure behavior beyond the manifest. In this context, hidden identity resolution is especially sensitive because the skill also advertises cloud history queries and report linking, which could expose user-associated records.

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-growth-stage-detection-analysis"
description: "AI-powered plant growth stage auto-detection from periodic full-plant images via smart pot / greenhouse fixed cameras. Recognizes key phenological features—cotyledon emergence, true-leaf count, flower bud differentiation, blooming, fruit setting, fruit ripening—and identifies the current developmental stage (germination, seedling, vegetative, flowering, fruiting, ripening), enabling precision irrigation/fertilization/lighting control and personalized growing guidance. Scenarios: smart pots, home grow boxes, greenhouses, plant factories. | 通过智能花盆或温室内固定�

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest scopes the skill to growth-stage detection from periodic full-plant images captured by fixed cameras. However, the code explicitly requires a local video path or network video URL and sends it as videoUrl, indicating video analysis capability beyond the declared image-only behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The implementation materially deviates from the declared skill purpose: it presents itself as plant image growth-stage detection but actually operates as a generic video analysis entrypoint. This kind of capability mismatch is dangerous because it can conceal broader data processing than users or platform reviewers expect, weakening informed consent and trust boundaries.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

User-facing CLI text and behavior describe a video analysis tool, contradicting the manifest's plant growth-stage detection claim. This inconsistency is a security-relevant deception pattern because reviewers and users may grant permissions or supply data under false assumptions about what the tool does.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This shared utility file provisions identities, reads credential material, persists tokens locally, and performs remote account-related API activity that is unrelated to plant growth stage detection. In the context of a plant phenology skill, this expands the trust boundary substantially and creates hidden identity and data-flow behavior that users would not reasonably expect.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code can silently create or auto-register accounts via an external API using derived usernames/open IDs, then store returned tokens locally. For a plant image analysis skill, this is unnecessary functionality and can cause unauthorized account creation, unintended identity linkage, and undisclosed transmission of user-associated data to a third party.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares no explicit tool scope even though its documented behavior includes shell execution, network access, and local file handling. Missing scope boundaries increase the chance of over-privileged execution and make it harder for a host platform to enforce least privilege or for users to understand what the skill can actually do.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The role section says to output only stage judgment and confidence, but other sections instruct the skill to provide care guidance, report links, and history results. Conflicting instructions increase the risk of over-sharing or invoking extra backend functions users did not expect from the role description.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The default trigger is broad enough that general plant-image requests may automatically activate the skill. Over-broad triggering can cause unnecessary file saving, remote processing, or cloud lookups on content that the user did not intend to submit to this specific backend.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation frames the skill primarily as stage classification, but later adds cloud-backed historical report retrieval and report link exposure. This hidden secondary function changes the data sensitivity profile because it can reveal past user analyses and associated links, not just process a current image.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation notes that uploaded files are auto-saved locally and that remote URLs are fetched by an API service, but it does not prominently warn users in the high-level description about these data flows. This creates a transparency and privacy issue because users may think they are only asking for visual classification, not initiating local persistence and remote retrieval.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a plant phenology analysis tool, but the code accepts a 'pet_type' parameter with values 'cat', 'dog', and 'other', and mutates a global default pet type before analysis. This behavior indicates reused or broader animal-classification-oriented logic that does not match the stated plant-only purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The user-facing argument descriptions and status/error messages are all written in Chinese, which imposes a specific language on all users of this script. There is no opt-in, alternate locale, or documented justification that this skill is intended only for a Chinese-speaking or region-specific environment.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.install_untrusted_source

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
skills/smyx_common/scripts/config-dev.yaml:2