Back to skill

Security audit

Pet Detection Skill | 宠物检测技能

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because scanners report account, identity, and report-history functions beyond its stated pet-detection purpose, alongside privacy and unexpected-action concerns.

Consider the reported identity, account, and history functions, along with possible media uploads and persistent token storage, before installing. The verdict is suspicious, not malicious; scan coverage was partial because a referenced local path was missing, so the evidence does not establish the behavior of that reference or that every flagged operation occurs in every use.

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/pet_detection_analysis.py
Finding

CLI initialization discards upstream sender identity and reuses a shared account

Content
View full analysis

Impact

In a shared-workspace deployment, one sender can obtain reports associated with another sender's previous operations under the fallback account. New analyses are also attributed to that shared account.

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

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The supplied chunk contains no image processing, video handling, animal classification, or target-area detection. Its concrete data model and specialized queries manage system users and tokens, which is materially different from the declared pet-detection purpose. Database storage can be a supporting implementation detail, but this chunk does not connect its user-management functionality to pet monitoring. These capabilities are established by the supplied code; actual invocation, external transmission, and behavior elsewhere in the skill are not shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

General formatting, polling, and file utilities can legitimately support pet detection. However, the supplied code also implements an undisclosed account and authentication subsystem: it reads a workspace identity file, manages local users, registers or logs them in remotely, and sends credentials and identity metadata with requests. Absolute destination URLs receive the same authentication headers without a visible host restriction. These capabilities exceed the declared pet-monitoring purpose. They execute when the relevant helpers are called, not merely because their definitions are imported. The absence of detection logic in a shared utility file is not, by itself, the basis for this finding.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

Generic AI-analysis endpoints could support pet detection and are not independently evidence of a mismatch. However, DETAIL_EXPORT_URL explicitly targets BASE_URL_HEALTH + '/health/order/api/getReportDetailExport?id=', introducing an unrelated health-report resource absent from the description. This supports a mismatch finding, although the chunk only configures that endpoint and does not demonstrate actual report access or export.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

The code exposes an account-associated history-listing operation through get_output_analysis_list(open_id=...), which is distinct from the declared pet-detection function. The visible analysis path is a generic video-analysis wrapper; it contains no explicit cat, dog, bird, target-area, image, or live-stream detection logic. Because the underlying skill implementation is not supplied, pet detection could occur there, so its absence from this wrapper alone is not conclusive. The concrete mismatch is the additional user-history retrieval capability. Identity resolution and optional result-file output are not independently treated as mismatches.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

The supplied code primarily implements analysis submission and report management. It contains no visible cat, dog, or bird detection logic, target-area configuration, or pet-specific result interpretation. File submission and asynchronous polling could support pet detection and are not themselves mismatches; however, report-history retrieval is an additional undeclared capability. Because the underlying API implementation is not supplied, pet detection might occur downstream, but that cannot be established from this chunk.

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: "pet-detection-analysis"
description: "Detects cats, dogs, and birds appearing in the target area; supports video stream and image detection, suitable for home pet monitoring scenarios. | 宠物检测技能,检测出目标区域内出现的猫、狗、鸟,支持视频流和图片检测,适用于家庭宠物监控场景"
version: "1.0.26"
license: "MIT-0"
---

# 🐾 Pet Detection Skill | 宠物检测技能
> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询

---

## 🧭 技能概览 | Overview

| 模块 | 内容 |
|---|---|
| 🏷️ 技能名称 | **宠物检测

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 run analysis, but supplying it still executes pet detection.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The script parses --export-env-only but never checks it, so supplying a media input still invokes analysis despite the explicit promise not to do so. For home-monitoring media, a user expecting configuration-only behavior could unintentionally upload sensitive images or video; identity initialization also occurs before any such guard.

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 file contents are passed to the analysis API without disclosure that the file will be uploaded.

Medium
Category
Output Handling
Confidence
86% confidence
Finding

The code reads the entire local file and passes its contents and filename as a file payload to the analysis API. There is no confirmation, user-facing notice, or comment explaining the remote transfer; the nearby comment describes only reading the file, leaving the privacy impact undisclosed.

Content

No source excerpt is available for this finding.

The --export-env-only option promises not to perform analysis, but analysis still runs when an input is supplied.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The configuration-only flag is accepted but ignored, and execution proceeds to identity initialization and video analysis when input is provided. Consequently, a supposedly non-analysis invocation can transmit private household video to the cloud.

Content

No source excerpt is available for this finding.

The service exposes username-based user lookup, an account-management capability outside the stated pet-detection purpose.

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

At L098–L101, get_user_by_username forwards a supplied username to RequestUtil.get_user_by_username. Looking up user accounts is not an obvious requirement for detecting cats, dogs, or birds in images or video, and the manifest does not declare account lookup as part of the skill's scope.

Content

No source excerpt is available for this finding.

The skill includes user-profile and credential database management unrelated to pet detection (L448–L473).

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The User model stores real names, email addresses, birthdays, and authentication tokens, while UserDao exposes inherited read, update, and delete operations on these records. DAO initialization also automatically creates tables and alters the sys_user schema (L180–L214). Managing user identities and credentials is not justified by the manifest's stated purpose of detecting cats, dogs, and birds in images or video.

Content

No source excerpt is available for this finding.

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

Medium
Category
Output Handling
Confidence
97% confidence
Finding

The generic open helper always uses mode 'w', which immediately truncates an existing file even before anything is written. There is no docstring, explanatory comment, confirmation, or user-facing message disclosing this behavior; exception tracing does not warn about successful truncation.

Content

No source excerpt is available for this finding.

The request helper silently registers remote user accounts and persists authentication data, beyond the stated pet-detection purpose.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

An ordinary HTTP request can initiate remote registration using silent=1 and register=1, then persist returned profile and authentication data through UserDao without an explicit enrollment step. Hosted pet detection can require authentication, but this hidden side effect expands a monitoring request into identity transmission and durable credential storage without a visible consent boundary.

Content

No source excerpt is available for this finding.

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

Medium
Category
Output Handling
Confidence
92% confidence
Finding

The generic request helper hides account-creation and local credential-persistence side effects behind a normal network operation. This duplicates the enrollment issue identified by SDI-2: users requesting pet detection are not visibly given a separate decision about registration and retention of authentication data.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The registration POST transmits the selected identity as both openId and mobile without a visible enrollment consent check. That identity can also be sourced from API_SECRET_KEY, creating a conditional risk of sending a credential as profile data; the configured destination and its trustworthiness are not available in this source.

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

Generic history-report phrases automatically trigger pet-detection report queries without requiring pet-related context.

Low
Category
Trigger Abuse
Confidence
94% confidence
Finding

Generic phrases such as querying historical reports can mandate a cloud pet-report query without establishing that the user means pet monitoring. This creates a limited privacy and authorization-of-action risk by retrieving and displaying household monitoring history in an unrelated reporting conversation.

Content

No source excerpt is available for this finding.

Configuration loading silently creates directories and files, including during module import.

Low
Category
Output Handling
Confidence
96% confidence
Finding

YamlUtil.load creates parent directories and writes a YAML file when the requested configuration is absent, without a warning, log, or explanatory comment. BaseEnum invokes this loader during subclass creation (L052–L058), so merely importing the module can modify the filesystem without an explicit save action.

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)

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 441)May include surrounding context.

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

            return query.scalar()
        finally:

ai_chat documents an agent invocation and analysis result, but performs neither.

Low
Category
Excessive Agency
Confidence
99% confidence
Finding

The docstring at L25–L34 states that this method invokes the openclaw agent through subprocess and returns an analysis result or session ID. However, the invocation is commented out, and the replacement empty dictionary at L68 causes an exception on result.stderr that is caught and suppressed, so the method returns None without performing analysis.

Content

No source excerpt is available for this finding.