Back to skill

Security audit

Pet Grooming Effectiveness & Hairball Risk Analysis | 宠物梳毛器梳理效果与毛球风险

Security checks for vulnerabilities and agentic risk

Overview

The skill performs the stated cloud pet-grooming analysis, but it silently creates or reuses a workspace-wide cloud identity and token store that can expose one user's report history to another user in the same workspace.

Review carefully before installing in any shared or multi-user agent workspace. The skill uploads pet media or URLs to lifeemergence.com services, silently creates or reuses a local/cloud identity, stores tokens locally, and can list cloud report history. It should only be used where users accept remote processing and where account/report history is isolated or non-sensitive.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/smyx_grooming_effectiveness_analysis.py:57
Finding

Workspace-wide fallback identity causes cross-user report access

Content
View full analysis

Vulnerability Details

File Location: scripts/smyx_grooming_effectiveness_analysis.py:57-65; skills/smyx_common/scripts/util.py:457-470; skills/smyx_common/scripts/util.py:580-612; skills/smyx_analysis/scripts/skill.py:143-157; skills/smyx_common/scripts/dao.py:475-495
Vulnerability Type: Broken user isolation through shared fallback authentication
Risk Level: High

Vulnerable Code

The primary entry point only permits the already initialized upstream identity to be used when the hidden --open-id argument was explicitly supplied:

python
# scripts/smyx_grooming_effectiveness_analysis.py:57-65
try:
    # 初始化内部用户身份;不要求用户输入,也不在帮助信息中展示。
    OpenIdUtil.resolve_current_open_id(args.open_id, use_current=bool(args.open_id))

    # 检查必需参数
    if args.list:
        open_id = ConstantEnum.CURRENT__OPEN_ID
        result = show_analyze_list(open_id)
        print(result)
        exit(0)

When --open-id is absent during normal Skill use, use_current is false. Consequently, the resolver skips CURRENT__OPEN_ID and CURRENT__USER_NAME, even if those values were initialized from the upstream sender context. It instead loads a workspace-wide identity or creates and reuses a common default user:

python
# skills/smyx_common/scripts/util.py:457-470
@classmethod
def resolve_current_open_id(cls, open_id=None, use_current=True):
    """解析并初始化当前 open-id,返回最终使用值。"""
    resolved_open_id = (open_id or "").strip() if isinstance(open_id, str) else open_id
    if not resolved_open_id and use_current:
        resolved_open_id = ConstantEnum.CURRENT__OPEN_ID or ConstantEnum.CURRENT__USER_NAME
    if not resolved_open_id:
        resolved_open_id = cls.get_api_key_file_open_id()
    if not resolved_open_id:
        resolved_open_id = cls.get_or_create_default_open_id()

    ConstantEnum.CURRENT__OPEN_ID = resolved_open_id
    if not ConstantEnum.CURRENT__USER_NAME:
        ConstantEnum.CURRENT__USER_NAME = resolved_open_id
    return resolved_ope
...[truncated 5722 chars]
Remediation
View remediation

Remediation Suggestions

  1. Preserve the upstream sender identity

    • Call resolve_current_open_id(args.open_id, use_current=True) so that CURRENT__OPEN_ID or CURRENT__USER_NAME is preferred when available.
    • Treat an explicitly supplied internal identity and a trusted upstream sender identity separately from an anonymous fallback.
  2. Do not share fallback accounts across requesters

    • If anonymous operation is required, scope fallback identities to the current authenticated Agent user, conversation, or tenant.
    • Do not select the first default user from a workspace-wide database for all invocations.
  3. Enforce server-side ownership

    • Bind analysis records to the authenticated upstream principal.
    • Require the server to verify ownership for report listing, result polling, and report export.
    • Do not rely solely on client-supplied usernames such as pnaUserName.
  4. Partition persisted credentials

    • Store tokens under a key derived from a verified sender and tenant identity.
    • Prevent one requester from loading tokens issued for another requester.
    • Apply restrictive filesystem permissions to the credential database.
  5. Fail closed in multi-user environments

    • If no trusted sender identity is available, reject history queries rather than silently using a shared account.
    • If anonymous analysis is supported, disable history access and isolate the generated report from other anonymous sessions.
  6. Add isolation tests

    • Create tests with two distinct upstream sender identities.
    • Verify that each identity receives separate remote credentials.
    • Verify that User B cannot list, poll, or export User A’s reports.
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
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (50)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Automatic user/OpenID generation, local API-key file reads, local user-database access, remote login, token management, and generic HTTP retries are sensitive authentication and persistence behaviors not disclosed by the skill description. In a media-analysis context, these hidden auth flows are especially risky because they can silently create accounts, bind data to identities, and expand access to backend systems.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Automatic user/OpenID generation, local API-key file reads, local user-database access, remote login, token management, and generic HTTP retries are sensitive authentication and persistence behaviors not disclosed by the skill description. In a media-analysis context, these hidden auth flows are especially risky because they can silently create accounts, bind data to identities, and expand access to backend systems.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Automatic user/OpenID generation, local API-key file reads, local user-database access, remote login, token management, and generic HTTP retries are sensitive authentication and persistence behaviors not disclosed by the skill description. In a media-analysis context, these hidden auth flows are especially risky because they can silently create accounts, bind data to identities, and expand access to backend systems.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Automatic user/OpenID generation, local API-key file reads, local user-database access, remote login, token management, and generic HTTP retries are sensitive authentication and persistence behaviors not disclosed by the skill description. In a media-analysis context, these hidden auth flows are especially risky because they can silently create accounts, bind data to identities, and expand access to backend systems.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Automatic user/OpenID generation, local API-key file reads, local user-database access, remote login, token management, and generic HTTP retries are sensitive authentication and persistence behaviors not disclosed by the skill description. In a media-analysis context, these hidden auth flows are especially risky because they can silently create accounts, bind data to identities, and expand access to backend systems.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Automatic user/OpenID generation, local API-key file reads, local user-database access, remote login, token management, and generic HTTP retries are sensitive authentication and persistence behaviors not disclosed by the skill description. In a media-analysis context, these hidden auth flows are especially risky because they can silently create accounts, bind data to identities, and expand access to backend systems.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Automatic user/OpenID generation, local API-key file reads, local user-database access, remote login, token management, and generic HTTP retries are sensitive authentication and persistence behaviors not disclosed by the skill description. In a media-analysis context, these hidden auth flows are especially risky because they can silently create accounts, bind data to identities, and expand access to backend systems.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Automatic user/OpenID generation, local API-key file reads, local user-database access, remote login, token management, and generic HTTP retries are sensitive authentication and persistence behaviors not disclosed by the skill description. In a media-analysis context, these hidden auth flows are especially risky because they can silently create accounts, bind data to identities, and expand access to backend systems.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Automatic user/OpenID generation, local API-key file reads, local user-database access, remote login, token management, and generic HTTP retries are sensitive authentication and persistence behaviors not disclosed by the skill description. In a media-analysis context, these hidden auth flows are especially risky because they can silently create accounts, bind data to identities, and expand access to backend systems.

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

The YARA hit for metadata poisoning indicators in the manifest description suggests potentially hidden or obfuscated control characters or schema-manipulation content. In agent ecosystems, poisoned metadata can mislead tool selection, bypass policy checks, or alter downstream parsing behavior in ways that are hard to spot during review.

Content

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

md
---
name: "smyx-grooming-effectiveness-analysis"
description: "Triggers when a user provides a pet grooming area video or image URL/file for analysis; supports local uploads or network URLs to call server-side APIs for coat condition and shed hair recognition, detecting matting area ratio and shed hair volume to output hairball risk level, helping prevent hairball syndrome. Application scenarios: smart grooming tools, long-haired pet care, pet health management. | 当用户提供梳毛器区域的视频/图像URL或文件时,触发本技能进行毛发表面状态分析;支持通过上传本地视频/图片或网络URL,调用服务端A

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The HTTP helper can automatically register or log in a user via /sys/phoneLogin, populate tokens, and save them locally before making API calls. For a grooming-effectiveness analysis skill, this is over-privileged hidden behavior that can transmit identifiers off-box and establish persistent authenticated state without explicit user awareness.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares broad operational behavior including local file handling, network API access, and shell execution, but it does not define any explicit tool scope or permissions boundary. This increases the chance that an agent runtime grants overly broad capabilities, making unintended file access, command execution, or outbound requests harder to constrain and audit.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill sends network URLs and historical report queries to cloud/server-side APIs without a clear privacy or data-transfer warning. Users may not realize that uploaded media references, report metadata, or identity-linked queries are being transmitted off-device to remote services.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill states that uploaded attachments are automatically saved locally, but it does not provide a clear user-facing warning, retention policy, or storage boundary. This creates privacy and data-handling risk because media may contain sensitive household, location, or personal content and could persist longer than users expect.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The user-facing output header is hardcoded in Chinese ("宠物梳毛器梳理效果与毛球风险分析结构化结果") with no indication that the skill supports locale selection or that it is intended only for a Chinese-speaking context. This creates a natural-language policy concern because the skill appears to impose a specific language on users by default.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script silently resolves and uses an internal open_id via OpenIdUtil.resolve_current_open_id(...), then uses ConstantEnum.CURRENT__OPEN_ID to fetch a history list. Because this identity handling is hidden from normal CLI users and there is no explicit disclosure, confirmation, or visible authentication boundary, the tool may act on a user/account context the operator did not intend, creating privacy and authorization risks around analysis history access.

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 = 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

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill returns fixed Chinese-language strings such as the report heading and export-link text, with no indication that the user can choose another language. This is a natural-language policy issue because it imposes a specific locale on all users without opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The fallback message ⚠️ 暂无分析结果 is presented only in Chinese, and there is no mechanism in this file for user language preference or opt-in. This forces a specific language for end-user communication.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code either forwards a user-supplied URL for analysis or reads a local file into memory and sends it via self.analysis(...). There is no confirmation prompt, print/log disclosure, or inline user-facing warning indicating that file or URL content will be transmitted to an external analysis service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The returned list header and empty-state message are Chinese-only user-facing text. No user locale choice or documented region-specific justification appears in this file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The function forwards a local file path or remote URL to skill.get_output_analysis for server-side processing, but the user-facing flow does not clearly warn that submitted media may be transmitted to a remote service. Because this skill handles potentially sensitive user-provided pet images/videos and URLs, lack of clear disclosure can cause unintended data sharing and privacy violations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script exposes a --list mode that retrieves historical analysis entries via skill.get_output_analysis_list(open_id=open_id), even though the declared skill purpose is analysis of user-provided grooming media. This expands the capability from single-request analysis into data enumeration/history access, which can expose prior user activity or results if access control around open_id or current identity resolution is weak elsewhere.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This file exposes broad generic CRUD and arbitrary HTTP wrapper methods that are not clearly constrained to the grooming-analysis purpose described in the skill metadata. In an agent-skill context, such reusable network primitives can be invoked for unrelated outbound requests or remote state-changing actions, expanding the attack surface and enabling capability overreach if higher-level code passes attacker-influenced URLs or payloads.

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