Back to skill

Security audit

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

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with high confidence because scanners report undeclared account and credential handling, sensitive video transfers without a clear consent gate, and behavior that may run analysis despite an export-only option.

The verdict is suspicious, not a finding that the author is malicious. Consider not installing until the account and credential behavior is explained, consent and destination details for video transfers are clear, and the export-only behavior is resolved. The scan was partial because one local reference could not be matched, so it does not establish that all referenced material was reviewed.

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

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The supplied chunk does not implement the declared sleep-monitoring purpose. It primarily establishes generic classes and an AI-chat placeholder. No subprocess actually runs, and there is no evidence of data exfiltration or other active external operations in this chunk. Imported base classes and API services are not shown, so their behavior cannot be assessed; the mismatch finding is limited to the visible implementation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Generic formatting, polling, and filesystem helpers are ordinary supporting implementation details and do not establish a mismatch by themselves. The material discrepancy is the undisclosed account-provisioning and credential-handling behavior: the code can read data/smyx-api-key.txt, submit a resolved identity to /sys/phoneLogin with silent registration enabled, and save returned tokens through a local DAO. Its request wrapper also accepts absolute URLs and attaches configured credentials without a visible host check. These capabilities exceed the stated sleep-monitoring purpose. They occur when the relevant methods are called; this chunk does not establish that they run automatically or that the rest of the skill lacks sleep functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Database persistence alone could support the declared sleep-monitoring purpose and would not establish a mismatch. However, the concrete functionality here centers on a general user-account store, including username/real-name lookup, default-user selection, token storage fields, and user-table migrations. No sleep-state identification, sleep records, report generation, or schedule analysis appears in this chunk. Its demonstrated purpose is therefore materially different from the description. This assessment is limited to the supplied code; it does not establish that other skill components lack sleep functionality or that any data is transmitted externally.

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.26"
license: "MIT-0"
---

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

---

##

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 analysis workflow lacks a privacy warning about sending infant-monitoring footage or its URL to an external API.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

Although cloud API use is mentioned, the workflow does not clearly warn parents that local nursery footage or a supplied video URL will be disclosed to an external processor before analysis. Infant footage can expose a child's identity, private living spaces, and family routines, making an uninformed transfer particularly sensitive.

Content

No source excerpt is available for this finding.

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

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The parser advertises an export-only mode that will not perform analysis, but the parsed flag is never checked. When a video input accompanies this flag, the program still invokes analysis, potentially transferring sensitive infant footage despite the caller explicitly selecting a non-analysis mode.

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 passed to the analysis API without disclosure of the upload.

Medium
Category
Output Handling
Confidence
96% 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. This creates a privacy risk when parents or an invoking agent assume that selecting a local file means local processing, especially for identifiable nursery footage.

Content

No source excerpt is available for this finding.

The --export-env-only option promises not to run analysis, but the code ignores it and proceeds with video analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The export-only flag promises not to run analysis, but execution never branches on its value and proceeds to analyze_video when an input is supplied. In this infant-monitoring context, that can cause an unintended external transfer of private video despite an explicit non-analysis selection.

Content

No source excerpt is available for this finding.

The documented create-only save operation can instead overwrite an existing record.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

Any insertion exception triggers an update by ID and potentially a fallback update matching username or realname, copying nearly all model columns. A create operation can therefore overwrite an existing user's profile or credentials if conflicting identifiers are supplied, although external exploitability depends on caller control and authorization.

Content

No source excerpt is available for this finding.

The skill includes system-user credential management beyond its stated sleep-analysis purpose.

Medium
Category
Excessive Agency
Confidence
86% confidence
Finding

The User model stores authentication tokens and open tokens alongside identifying information (L454-L461), and UserDao exposes inherited create, read, update, and delete operations over these records. Managing system-user credentials is not an obvious requirement of sleep-state classification or daily sleep reporting, and the manifest declares no account-management or authentication capability.

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

The generic open helper always uses mode 'w', which immediately erases an existing file's contents. No docstring, comment, confirmation, or user-facing log explains this destructive behavior; the exception handler only runs after a failure.

Content

No source excerpt is available for this finding.

The sleep-analysis skill silently registers or logs into a remote service and persists account credentials.

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

An ordinary HTTP request can automatically invoke a separate login/registration endpoint with silent and register enabled, then persist returned credentials through UserDao. No explicit enrollment approval is enforced here, creating an undisclosed account and credential lifecycle that is particularly sensitive for a service handling infant-related information.

Content

No source excerpt is available for this finding.

HTTP requests can silently initiate remote user registration without disclosing the additional identity transmission.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The generic request path can initiate remote registration and send the current identity as both openId and mobile, without a separate opt-in check. This additional identity transmission is not inherent to local sleep analysis and can surprise users who did not authorize account creation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The POST sends an identity to the configured health-service endpoint, and the caller preferentially derives that identity from API_SECRET_KEY when it is set. Consequently, a credential can be copied into registration/profile fields as openId and mobile, exposing it to processing or logging beyond its authentication purpose; the source does not establish a malicious destination.

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

YamlUtil.load creates the parent directory and writes a YAML file when the requested configuration is absent, without a prompt, log, docstring, or explanatory comment disclosing this side effect. Because BaseEnum.init_subclass invokes this loader at L053 and L058, merely 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 documents invoking an analysis agent, but its implementation never executes the agent and returns no analysis.

Low
Category
Excessive Agency
Confidence
99% confidence
Finding

The docstring at L25–L35 explicitly promises a subprocess invocation of openclaw agent and an analysis result or session ID. However, the invocation is commented out at L61–L66, and the empty dictionary assigned at L68 causes an AttributeError at L70 that is caught and suppressed at L81–L82, so this method cannot perform the documented 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