Back to skill

Security audit

Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because scanners report privacy and account-security risks beyond its stated infant sleep-monitoring purpose, including undisclosed video uploads and shared-account behavior.

Consider avoiding installation until the account-sharing, credential handling, and video-upload concerns are addressed and the service’s data practices are clear. The scanners report complete coverage of the listed files, but dependency inspection was not requested, so third-party dependencies were not assessed.

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/infant_sleep_monitoring_analysis.py:57
Finding

Default CLI flow discards the upstream sender identity and reuses a shared account

Content
View full analysis

Impact

A second sender can retrieve reports created under the shared account by another sender, exposing infant sleep and monitoring information. New analyses are also attributed to that shared account. This does not require a server-side authorization bypass because the client supplies valid credentials for the wrong 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 (24)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Generic formatting, polling, and HTTP helpers could legitimately support sleep reporting and are not mismatches by themselves. However, this chunk also implements substantive credential access, persistent identity provisioning, and remote account registration that the declared sleep-monitoring purpose does not disclose. Its request wrapper can attach authentication headers to arbitrary supplied HTTP(S) destinations, and debug mode enables low-level HTTP logging that may expose sensitive traffic. These behaviors occur when the relevant helpers are called; the snippet does not establish that data was actually transmitted or that the broader skill lacks sleep functionality. No sleep-state detection or report generation is implemented in the supplied chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

Database persistence could legitimately support sleep monitoring and is not itself a mismatch. However, this chunk specifically implements user-profile and token persistence, including user lookup, modification, and deletion, rather than sleep-state storage or analysis. Those account-management capabilities are not represented in the declared purpose. No sleep classification, reporting, or schedule analysis appears in the supplied chunk. This finding is limited to the shown code; it does not establish malicious behavior or external transmission.

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: "infant-sleep-monitoring-analysis"
description: "Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能,识别熟睡、浅睡、苏醒、躁动不同睡眠状态,生成每日睡眠报告和作息分析,帮助家长掌握宝宝睡眠规律"
version: "1.0.28"
license: "MIT-0"
---

# 😴 Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能
> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询

---

##

The analysis workflow lacks a privacy warning about sending infant-monitoring media to an external API.

High
Category
Output Handling
Confidence
95% confidence
Finding

Although API use is mentioned, the local-file workflow does not clearly tell parents that their infant-monitoring footage will leave the device for third-party processing. Nursery video is especially sensitive, making an undisclosed upload a substantial privacy risk.

Content

No source excerpt is available for this finding.

The request helper can forward service credentials to caller-selected HTTP or HTTPS destinations.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

Absolute caller-supplied HTTP and HTTPS URLs bypass the base URL, but the helper still attaches service tokens and the API key. A caller-controlled destination can receive these credentials, while HTTP also exposes them in transit; stolen credentials could expose account data, including sensitive sleep records.

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.

History-query triggers include generic report phrases without requiring infant-sleep context.

Medium
Category
Trigger Abuse
Confidence
92% confidence
Finding

The document includes generic history-report phrases as automatic triggers and requires a cloud query rather than clarification. This can retrieve and display sensitive infant-related records when the user intended an unrelated report query.

Content

No source excerpt is available for this finding.

The documented export-only mode does not prevent sleep analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The export-only flag promises not to perform analysis, but its parsed value is never checked. When combined with an input or list option, execution proceeds into analysis or cloud retrieval despite that promise, potentially transmitting sensitive infant footage unexpectedly.

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 video contents are submitted to an API without disclosure of the upload.

Medium
Category
Output Handling
Confidence
95% confidence
Finding

The implementation reads the complete local video into a multipart file payload and passes it to the analysis service without a visible disclosure or authorization gate. In an infant-monitoring workflow, this can expose highly sensitive household footage when the user expects local analysis.

Content

No source excerpt is available for this finding.

The --export-env-only option promises not to run analysis, but supplying it does not prevent video analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The export-only option is registered but never used to control execution. Supplying it with a video input still invokes analysis, violating the explicit no-analysis promise and potentially causing an unintended external disclosure of private video.

Content

No source excerpt is available for this finding.

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

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

Any insertion exception triggers an update by ID and then potentially by username or realname, copying fields including identity and credentials without verifying that the existing record is the intended update target. A conflicting or malformed incoming user model can therefore overwrite another local user record if it reaches this method, compromising account integrity and potentially the association of sensitive infant-related data.

Content

No source excerpt is available for this finding.

FileUtil.open silently truncates existing files.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

The generic open helper always uses write mode, which immediately truncates an existing file. No docstring, explanatory comment, confirmation, or user-facing log discloses this destructive behavior; the exception handler does not warn about successful truncation.

Content

No source excerpt is available for this finding.

Sleep-analysis requests can silently register a remote service account and persist its credentials.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

An ordinary request can invoke phoneLogin with silent registration enabled, transmit an identity, and subsequently persist returned tokens without an explicit opt-in step in this flow. Remote account creation and credential retention are material side effects that users requesting infant sleep analysis may not expect.

Content

No source excerpt is available for this finding.

HTTP requests can silently trigger remote account registration without disclosure.

Medium
Category
Output Handling
Confidence
95% confidence
Finding

The request helper can register a remote account automatically when credentials are missing, using silent=1 and register=1 without a consent check in the visible flow. This duplicates the registration concern reported under SDI-1 and creates an unexpected privacy-relevant side effect for a sleep-analysis skill.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The POST sends the selected identity as both openId and mobile to a remote login/registration service without an explicit consent gate in this flow. That identity can be derived from API_SECRET_KEY, so some configurations may also transmit a secret as ordinary identity data; this call does not itself show transmission of sleep measurements.

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

YamlUtil.load creates the parent directory and writes a YAML file when the requested path does not exist, without a warning, log, or explanatory comment/docstring. BaseEnum.init_subclass invokes this loader during class definition (L044–L058), so importing the module can modify the filesystem unexpectedly.

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 invoking the OpenClaw agent, but its implementation never invokes it.

Low
Category
Excessive Agency
Confidence
99% confidence
Finding

The docstring at L26 explicitly states that this method calls the OpenClaw agent through subprocess. However, both command construction and subprocess execution are commented out (L48–L66); the method instead creates an empty dictionary at L68, attempts attribute access on it, and catches the resulting exception without returning an analysis result. This contradicts the documented delegation behavior rather than implementing an alternative invocation mechanism.

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