Back to skill

Security audit

Sleep Quality Analysis Skill | 睡眠质量分析技能

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this sleep-analysis skill suspicious because scanners report broad account and credential handling, overly permissive network requests, and unclear handling of sensitive sleep footage; review it carefully before installing.

The verdict is suspicious, with high overall confidence, and Skillspector recommends not installing. Before deciding, consider the reported credential forwarding, silent account registration and token storage, and external processing of sensitive sleep footage without a clear consent step. The scan was partial because one local reference could not be resolved, so it does not establish that every referenced component was assessed.

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

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The supplied chunk implements general user-account persistence, not sleep-stage identification or sleep-event monitoring. Database access can support a sleep-monitoring skill, but this code specifically manages identities, personal details, and tokens without any demonstrated connection to sleep data. That is a materially different capability from the declared purpose. No network transmission or malicious use of the stored information is shown; this assessment is limited to the supplied chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Ordinary formatting, polling, and filesystem helpers could support a sleep-monitoring skill and are not independently evidence of a mismatch. However, this chunk also implements an undeclared account-provisioning, credential-persistence, and billing-related workflow, materially broader than the stated sleep-monitoring purpose. These behaviors occur when the relevant utility methods are called, not necessarily on import. Because this is a shared utility file, the absence of sleep algorithms does not prove that the complete skill lacks them; the finding is limited to the additional capabilities visible here.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The declared sleep-monitoring purpose is not represented in the supplied implementation. No sleep data processing, stage classification, or apnea detection is visible. The commented-out agent command is not an executed capability. Imported base classes and services are not provided, so any sleep functionality they might contain cannot be assessed.

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: "sleep-quality-analysis"
description: "Identifies sleep stages including falling asleep, light sleep, deep sleep, and REM; monitors body movement, nighttime awakenings, and sleep apnea, suitable for sleep monitoring scenarios. | 睡眠质量分析技能,识别入睡、浅睡、深睡、快速眼动阶段,监测体动、夜间觉醒、睡眠呼吸暂停,适用于睡眠监测场景"
version: "1.0.24"
license: "MIT-0"
---

# 😴 Sleep Quality Analysis Skill | 睡眠质量分析技能
> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询

---

## 🧭 技能概览 | Ov

The analysis workflow lacks a privacy warning about sending sensitive sleep-monitoring footage to an external API.

High
Category
Output Handling
Confidence
94% confidence
Finding

Although the manifest mentions an API, it directs automatic processing without a clear warning or consent step for transferring bedroom footage and health-related data to an external processor. Sleep-monitoring footage is unusually sensitive, making an uninformed external upload a significant privacy exposure.

Content

No source excerpt is available for this finding.

The HTTP helper forwards shared service credentials to arbitrary caller-supplied destinations.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

Absolute caller-supplied HTTP and HTTPS URLs are accepted, after which shared access tokens, an API key, and an authorization token are automatically attached. An attacker who influences the destination can receive those credentials and the injected user or tenant metadata; accepting plaintext HTTP also permits network interception.

Content

No source excerpt is available for this finding.

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 documented export-only mode still executes sleep analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The parser advertises that --export-env-only performs no analysis, but the flag is never checked before identity initialization and analysis execution. When supplied with an input, a command intended only to export configuration can instead submit sensitive sleep footage for processing.

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 submitted to the analysis API without disclosing the upload.

Medium
Category
Output Handling
Confidence
91% confidence
Finding

The method reads the local video's full contents and passes them to the analysis service without a visible upload disclosure or consent gate. This is expected analysis functionality rather than evidence of malicious exfiltration, but intimate sleep footage makes undisclosed external processing a substantial privacy risk.

Content

No source excerpt is available for this finding.

The documented environment-export-only mode still executes video analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The --export-env-only option promises not to analyze video, but its parsed value is never used to stop execution. With an input supplied, the program continues into the analysis path and can upload sensitive footage despite the user's explicit no-analysis mode selection.

Content

No source excerpt is available for this finding.

The service exposes unrestricted remote mutation capabilities unrelated to the declared sleep-analysis purpose.

Medium
Category
Excessive Agency
Confidence
88% confidence
Finding

The HTTP wrappers accept caller-supplied URLs and arguments, including PUT and DELETE operations, without restricting them to sleep-monitoring endpoints or operations. While API access can support sleep analysis, this general-purpose ability to modify or delete remote resources is not justified by the manifest's stage-identification and monitoring scope; this file does not establish that those operations are actually invoked.

Content

No source excerpt is available for this finding.

save() is documented as creating a new record but can overwrite an existing user record.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

Any insertion exception triggers an update attempt, followed by a username-or-realname lookup that can overwrite an existing user's fields, including identity and token fields. If incoming records are attacker-influenced or identifiers collide, an operation documented as creation can corrupt another user's credentials; a shared database used for sleep monitoring increases the consequences of identity confusion.

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

The generically named open helper always uses mode 'w', which immediately erases existing file contents. There is no docstring, explanatory comment, confirmation, or operation log disclosing that destructive behavior; the exception handler only runs after a failure.

Content

No source excerpt is available for this finding.

The request helper silently registers remote accounts and persists user credentials, beyond the stated sleep-analysis scope.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

A routine HTTP call can initiate silent registration using the current identity and persist returned authentication tokens through UserDao without an explicit enrollment step. This creates undisclosed remote identity and credential-storage side effects beyond the stated sleep-analysis functionality, although the source does not establish malicious intent or actual transmission of sleep measurements.

Content

No source excerpt is available for this finding.

Ordinary HTTP requests can silently register a remote account and persist authentication tokens.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

When credentials are missing, the generic request helper can register an account and save tokens as an implicit side effect. This is the same underlying enrollment issue identified by SDI-1: callers expecting an ordinary request may unexpectedly transmit identity information and create persistent credentials.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This POST transmits the selected identity as both openId and mobile to a configured remote login service, with silent registration enabled. Network access is not inherently unsafe, but here the implicit enrollment exposes identity information without a visible consent boundary; the supplied configuration does not establish that the destination is malicious.

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

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

Low
Category
Output Handling
Confidence
93% confidence
Finding

When a configuration file is absent, YamlUtil.load creates its parent directories and writes a new YAML file without a prompt, log, comment, or docstring disclosing this side effect. BaseEnum.init_subclass calls this loader at L053 and L058, so simply 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)

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 claims to invoke the OpenClaw agent, but execution is disabled and no analysis result is returned.

Low
Category
Excessive Agency
Confidence
99% confidence
Finding

The docstring at L26 explicitly states that this method invokes the OpenClaw agent through subprocess, and L33–L34 promise an analysis result or session ID. However, the subprocess call is commented out, and the empty dictionary assigned at L68 causes result.stderr to raise AttributeError; the catch block suppresses that error and the method returns None without performing analysis.

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/util.py (reported line 30)May include surrounding context.

python
elif isinstance(cur, dict):
                        cur = cur.get(part, default)
                    else:
                        cur = getattr(cur, part)
                return cur
            except Exception:
                return default