Back to skill

Security audit

Child Restless Sleep / Nightmare Detection | 儿童睡眠中频繁翻身/噩梦识别

Security checks for vulnerabilities and agentic risk

Overview

This skill needs review because its no-analysis option can still upload recordings, and its automatic account handling lacks clear user control.

Wait for the publisher to fix the no-analysis option and clarify remote registration, credential handling, account separation, and recording retention/deletion. Any use sends selected recordings to LifeEmergence and requires informed guardian consent. Do not rely on this package for continuous monitoring or delivered parental alerts.

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
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (23)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The supplied code's substantive functionality is user-data persistence, not child-sleep analysis. Database access could support a monitoring system, but this chunk contains only generic persistence and account-management functionality, with no sleep-specific models or integration establishing that supporting role. The mismatch concerns the supplied chunk; it does not establish that the broader skill lacks monitoring functionality or that the database operations are malicious.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The supplied code does not implement the declared primary purpose. It contains no sleep-specific processing, monitoring loop, reporting, or alerting logic. Although comments describe invoking an external agent, that invocation is disabled and should not be treated as an active capability. Imported base classes and services are not supplied, so their behavior cannot be verified; this assessment is limited to the visible chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code contains no camera or microphone capture, sleep-event detection, sleep reporting, or parent-alert logic. Generic utilities alone would not establish a mismatch, and this shared module could support a larger application. However, the supplied chunk also implements substantive, undeclared account provisioning and credential-bearing network behavior. In particular, the HTTP wrapper accepts absolute URLs while adding configured authentication headers without an origin restriction. These behaviors extend beyond the stated child-sleep-monitoring purpose. This assessment is limited to the supplied chunk and does not establish what other skill files implement.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The description promises continuous capture and parental alerts, while the supplied entry point performs on-demand analysis of files or URLs without a visible monitoring or notification loop. Parents could incorrectly believe active monitoring is occurring; remote analysis could implement event detection, but that does not establish continuous capture or alert delivery.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The continuous-monitoring and parental-notification claims exceed the visible on-demand workflow, creating a risk of misplaced reliance in a child-care context. However, history retrieval is explicitly documented in the skill body, and the absence of local detection algorithms does not prove that the remote service lacks them.

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-child-nightmare-rollover-detection-analysis"
description: "Using a fixed camera in the child's bedroom (infrared night vision), the system continuously captures video and audio at night to analyze the child's sleep behavior. It detects rollover frequency (rollovers per minute), cries (recognizing specific cry-sound features), and sleep talk (speech during sleep), and generates a sleep-quality report. When rollovers occur too often (e.g., > 3 per hour), strong crying is detected, or sleep talk is observed, the system pushes 'possible nightmare' or 'restless sleep' alerts to the parents. Application scenarios: child bedrooms, infant rooms.

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 environment-only mode still executes sleep-media analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The parser accepts --export-env-only, but no branch checks it before identity initialization or analysis. When media input is supplied, a caller expecting no analysis can instead trigger processing and potentially upload sensitive child-bedroom recordings.

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

Medium
Category
Output Handling
Confidence
88% confidence
Finding

The code reads a local recording into memory and passes its complete contents to the analysis service without an upload-specific disclosure or consent check. Although cloud APIs are mentioned in the documentation, local-input handling does not clearly explain that private child-bedroom audio and video leave the device, making the privacy consequences unusually serious.

Content

No source excerpt is available for this finding.

The --export-env-only option promises not to perform analysis, but analysis still runs.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The environment-only flag is parsed but never consulted, so supplying it with media input still reaches analyze_video. This violates the explicit no-analysis promise and can cause unintended remote processing of sensitive recordings when used in the child-sleep workflow.

Content

No source excerpt is available for this finding.

ai_chat claims to invoke the analysis agent, but its implementation never executes it and returns no analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The docstring at L26 states that this method invokes openclaw agent through subprocess, and L33–L34 promise an analysis result or session ID. However, subprocess execution is commented out at L61–L66; the empty dictionary assigned at L68 raises AttributeError when accessed as result.stderr at L70, which is caught and suppressed, causing the method to return None. This contradicts the documented analysis behavior rather than merely implementing it differently.

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

The generically named open helper always uses mode 'w', which immediately erases an existing file's contents even before anything is written. No docstring, comment, confirmation, or user-facing log explains this destructive behavior.

Content

No source excerpt is available for this finding.

HTTP requests can silently register an external account, beyond the declared sleep-monitoring purpose.

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

When credentials are missing, the general HTTP helper automatically calls phoneLogin with silent=1 and register=1, potentially creating an external account without a consent gate in this code. Although service authentication may support sleep monitoring, implicit enrollment is privacy-sensitive for a child-bedroom application and is not explained by the supplied skill description.

Content

No source excerpt is available for this finding.

Automatic remote login and registration transmit the current identity without disclosure.

Medium
Category
Output Handling
Confidence
92% confidence
Finding

The automatic login/registration request sends the current identity as both openId and mobile, together with a source identifier, to the configured health service. No disclosure or approval check is visible, creating an unexpected identity-transfer risk in a privacy-sensitive child-monitoring context; this overlaps the silent-registration finding.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This POST is the transmission sink for the automatic identity disclosure: its payload contains the selected username as openId and mobile. The caller can select API_SECRET_KEY as that identity, potentially also sending a credential in identity fields; the supplied code does not establish that the destination is malicious or that bedroom recordings are transmitted.

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

YamlUtil.load creates parent directories and writes a YAML file when the requested configuration is missing, without a comment, docstring, prompt, or log disclosing this side effect. BaseEnum.init_subclass invokes this loader when subclasses are defined (L053 and L058), so 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 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:

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/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