Back to skill

Security audit

Pet Separation Anxiety Relief (Owner Away) | 宠物分离焦虑舒缓(主人离家时)

Security checks for vulnerabilities and agentic risk

Overview

The skill is mainly a cloud video-analysis wrapper for pet footage, but it silently creates or reuses account identity, stores tokens locally, and queries account-linked history with limited user control.

Review before installing. This skill may upload pet-camera videos or URLs to a third-party cloud service, create or reuse an internal account identity without asking, persist tokens locally, and retrieve cloud report history tied to that identity. Install only if those cloud processing and local credential-storage behaviors are acceptable for the footage and workspace involved.

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_separation_anxiety_relief_analysis.py:5
Finding

Python Module Hijacking Through a World-Writable Import Search Path

Content
View full analysis

Vulnerability Details

File Location: scripts/smyx_separation_anxiety_relief_analysis.py, lines 5–7
Vulnerability Type: Python import-path hijacking through a shared temporary directory
Risk Level: Medium

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)

import argparse
import json
import mimetypes
import traceback
from datetime import datetime

import requests
import sys
import os

from .config import *
from .skill import skill

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

Technical Analysis

The entry point derives an import root by traversing three directories upward from its own directory and inserts the result at index zero of sys.path.

Under the audited deployment path:

text
/tmp/clawhub-codex-scan-v57b9p8fznzbfksjfz7et1f3y18g4pzg-QapSUy/artifact/scripts/

the traversal resolves as follows:

text
scripts -> artifact -> clawhub-codex-scan-... -> /tmp

Consequently, /tmp is placed at the highest import priority. The subsequent import of skills.smyx_common.scripts.util, including imports reached through .skill, may therefore resolve against an attacker-created /tmp/skills package rather than the package included in the project.

On a typical multi-user system, /tmp is writable by unprivileged local users. Python executes top-level module code during import, so resolving an attacker-controlled package from this directory results in arbitrary Python code execution before the Skill begins its intended analysis operation.

This is an exploitable coding flaw rather than evidence that the project author intentionally included malicious code.

Attack Path

  1. The Skill is installed or executed from the audited directory structure beneath /tmp.
  2. A separate, low-privileg ...[truncated 1918 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the three-level traversal and never insert /tmp or another shared writable directory into sys.path.

  2. If source-tree execution must be supported, calculate the actual project root directly from the entry point:

    python
    current_dir = os.path.dirname(os.path.abspath(__file__))
    project_root = os.path.dirname(current_dir)
    
    if project_root not in sys.path:
        sys.path.insert(0, project_root)
    
  3. Prefer installing the project as a Python package and using package-relative imports rather than modifying sys.path at runtime.

  4. Before adding any dynamically calculated import root, resolve it with os.path.realpath() and verify that:

    • It is the expected project directory.
    • It is owned by the expected account.
    • It is not writable by other users.
    • It does not traverse through an attacker-controlled symbolic link.
  5. Run the Skill from a private, access-controlled installation directory rather than directly beneath a shared temporary directory.

  6. Add a regression test that evaluates the calculated import root for representative installation paths and rejects shared temporary directories such as /tmp.

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 (52)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding adds concrete evidence of unrelated risky behavior: local identity data reads, user/open-id management, outbound HTTP login/registration, token handling, and local account persistence, with no corresponding pet-monitoring logic. In the context of a home-pet camera skill, that is especially concerning because it combines sensitive media workflows with undisclosed identity/account operations and network exfiltration potential.

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-separation-anxiety-relief-analysis"
description: "AI-powered pet separation anxiety detection & relief when the owner leaves home. Real-time monitoring via smart camera detects typical anxiety signs—continuous vocalization, pacing, scratching doors/windows, destructive chewing. When anxiety reaches preset thresholds, the system auto-triggers comfort actions (play owner's pre-recorded voice, dispense treats via smart feeder, activate interactive toys) to reduce anxiety and destructive behavior, improving pet welfare. Scenarios: pet households (especially office workers / frequent travelers), pet boarding centers. | 通过智能

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This utility code automatically provisions or logs in platform users, retrieves tokens, and persists identity data locally, which is unrelated to a pet anxiety monitoring skill's stated purpose. That creates an unnecessary identity and credential handling surface, enabling silent account creation, token reuse, and broader platform access if the skill is installed or invoked in an unsuspecting workspace.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill requests or implies use of powerful capabilities (environment access, filesystem reads/writes, network, and shell) but does not declare any explicit tool scope or permission boundaries. That makes it harder to review, enforce least privilege, and prevent the agent from invoking risky operations beyond what users would reasonably expect from a pet-behavior analysis skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The workflow states that uploaded attachments or media are automatically saved locally without a user warning. Automatic local persistence increases privacy risk, especially for in-home pet camera footage, because it may create residual sensitive files, broaden access to the media, and conflict with user expectations of ephemeral processing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill describes cloud history queries and network video retrieval but omits clear privacy and integrity warnings about sending potentially sensitive home-pet video URLs and accessing account-linked report history. In this context, users may unknowingly expose in-home surveillance content or trust remote resources without understanding where data goes or how it is validated.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script exposes a history-report listing path via --list tied to an internal/open-id identity, even though the skill description only covers real-time behavior analysis and relief actions. This creates an unnecessary data-access surface that could expose prior monitoring results for a user identity, especially because the identity handling is hidden from normal help output and not clearly constrained here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code defines the command description and argument help text entirely in Chinese, and later prints Chinese-only status and error messages. That imposes a specific language on all users without opt-in or justification, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code initializes a hidden internal identity input (--open-id suppressed from help) and uses OpenIdUtil.resolve_current_open_id(...) despite this being unrelated to local pet-anxiety video analysis. Hidden identity parameters are risky because they enable undisclosed account-context switching or data scoping behavior that users and reviewers may not notice, increasing the chance of unauthorized data access or cross-tenant report retrieval.

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
93% confidence
Finding

Multiple user-visible strings, such as the report header and export-link text, are hardcoded in Chinese, and error/status messages elsewhere in the file are also Chinese-only. The file does not offer a language selection or explain a justified region-specific constraint, which makes this a natural-language locale policy issue.

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 narrowly scoped pet separation-anxiety skill that monitors pets for anxiety behaviors and triggers relief actions such as voice playback, treat dispensing, or toy activation. In this file, the implemented behavior is generic upload/URL-based video analysis, polling for analysis completion, and listing/exporting reports; there is no pet-specific logic, anxiety-threshold handling, or any comfort-device actuation shown.

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