Back to skill

Security audit

Elderly Sleep Nightmare / Startle Detection | 老年人睡眠中间惊醒/梦魇行为识别

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because scanners report sensitive video uploads, credential and identity handling, and other capabilities that do not clearly match its stated sleep-event analysis purpose.

Treat this as a review-needed skill, not as proof of malicious intent. Before installing, consider whether you are comfortable with bedroom recordings being processed by an external service and with account details being created or stored; the scan also reports credential forwarding to arbitrary URLs. Coverage is incomplete because one local reference could not be resolved, and the separate AIG scan returned no findings, which does not resolve the concerns reported by the partial Skillspector scan.

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

The supplied chunk implements a generic database layer centered on the sys_user table, including username/real-name lookup, default-user selection, and record insertion, updating, and deletion. Its user model includes email, birthday, sex, age, token, and open_token fields. No camera or microphone processing, abnormal-event detection, or event timing and duration records are present. Database persistence could support the declared skill, but this chunk's concrete user and credential-management functionality is materially different and is not connected to that purpose in the supplied code. This assessment is limited to the provided chunk; it does not establish what other skill components do or indicate malicious intent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The chunk contains no camera or microphone processing, sleep-event detection, or event-specific timing and counting logic. Generic utilities and HTTP access could support the declared system, but the implemented account-provisioning, credential-management, and billing workflows introduce capabilities not represented in the description. Debug mode also enables low-level HTTP logging that may expose request contents or authentication material. These behaviors are available when the relevant functions are invoked; the snippet does not establish that they execute automatically or that the full skill lacks detection code elsewhere.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The visible implementation does not substantiate the declared primary functionality. It contains no sleep-analysis logic, and the apparent external-agent invocation is disabled, so it should not be characterized as executing commands or transmitting data. Imported base classes and services are not supplied; their behavior cannot be determined from this chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The supplied chunk implements a generic remote-service interface rather than sleep-video or audio analysis. It contains no event detection or event timing, counting, or duration calculation. Download URLs and pagination could support a larger video-processing system and are not independently suspicious, but user lookup and unrestricted generic data-operation wrappers expose capabilities not represented in the description. These methods run only when called; the chunk does not establish actual network destinations, sensitive-data transmission, or malicious behavior. The assessment is limited to this code 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: "smyx-elderly-nightmare-startle-detect-analysis"
description: "Using a fixed bedroom camera (infrared night vision + microphone), the system analyzes elderly nighttime sleep video and detects abnormal events such as sudden sitting-up (quick lying-to-sitting transition), screams (high-pitched short cries), and arm-thrashing (purposeless rapid arm movements), and records the occurrence time, frequency and duration of each event. | 通过卧室固定摄像头(红外夜视),分析老年人夜间睡眠视频,检测突然坐起(快速从躺卧变为坐立)、惊叫声音(高频短促叫声)以及挥舞手臂(无目的性的快速

The generic request helper forwards service credentials and user identity to arbitrary absolute URLs.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The helper accepts arbitrary absolute HTTP or HTTPS URLs and automatically attaches service tokens, the API key, and user identity without checking the destination origin. If an attacker can influence a caller's URL, these secrets can be sent to an attacker-controlled host, while HTTP also permits interception; compromised credentials may expose sensitive service data.

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 workflow lacks an explicit warning that sensitive bedroom recordings are processed by an external API service.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

Although cloud APIs are mentioned, the standard workflow does not clearly warn that local bedroom recordings will be uploaded to an external processor before analysis. General consent to monitoring does not necessarily authorize that transfer, and intimate recordings plus health-related inferences substantially increase the privacy impact.

Content

No source excerpt is available for this finding.

The --export-env-only help promises no analysis, but the flag is ignored and video analysis still runs.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The parser accepts --export-env-only but never checks it, so supplying this supposedly non-analysis option together with media still reaches the analysis call. For sensitive bedroom recordings, violating that explicit no-analysis expectation can cause an unintended external upload; 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 video contents are submitted to the analysis API without disclosure of the upload.

Medium
Category
Output Handling
Confidence
93% confidence
Finding

The implementation reads the complete local recording and passes it as a multipart file to the analysis API without a visible external-upload authorization check. While remote analysis is a legitimate function, bedroom audio/video requires clear authorization for external processing, not merely permission to analyze a local file.

Content

No source excerpt is available for this finding.

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

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The --export-env-only flag promises not to analyze video but is never inspected after argument parsing. With an input supplied, execution proceeds to remote analysis, potentially transferring intimate bedroom recordings despite the caller's explicit selection of a non-analysis mode.

Content

No source excerpt is available for this finding.

The file implements general user-account and credential management beyond the stated sleep-event analysis purpose.

Medium
Category
Excessive Agency
Confidence
88% confidence
Finding

The User model includes personal profile data and token/open_token fields (L448–L465), and UserDao exposes the inherited read, write, update, and delete operations for these records (L470–L473). DAO initialization also creates and migrates the user table (L180–L215). Managing account credentials is not an obvious requirement of detecting nighttime movements and screams or recording event statistics, and the manifest declares no account-management or authentication integration.

Content

No source excerpt is available for this finding.

ai_chat documents agent execution and analysis results, but its implementation never invokes the agent and returns no result.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The docstring at L26–L34 promises a subprocess invocation of openclaw agent and an analysis result or session ID. However, the subprocess call is commented out at L61–L66, and the replacement dictionary at L68 causes attribute access at L70 to fail; the exception handler then exits without a result. This contradicts the documented analysis capability and could leave callers without analysis while exposing the failure only in debug output.

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 uses mode 'w', which immediately erases an existing file's contents. No docstring, comment, confirmation, or user-facing message explains this behavior; the exception handler does not disclose successful truncation.

Content

No source excerpt is available for this finding.

The request helper silently registers a remote account and persists account credentials, beyond the declared sleep-event analysis.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

An ordinary request can trigger remote login or registration using the current identity and then persist returned credentials without an explicit enrollment step in this helper. This introduces undisclosed identity disclosure and credential retention into a bedroom-monitoring workflow; the code does not establish that video or audio is uploaded by this operation.

Content

No source excerpt is available for this finding.

The HTTP helper silently registers or logs in a remote user as a prerequisite to ordinary requests.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The authentication fallback explicitly requests silent registration as a side effect of a generic HTTP operation. This is the same underlying enrollment issue as the SDI-1 finding: account creation and identity transmission occur without an explicit enrollment decision in the shown workflow.

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 during automatic remote enrollment. The identity can originate from local configuration or an API-key value, making this more than a generic networking warning: potentially sensitive identifiers are disclosed without a consent step shown here, although the configured endpoint's trustworthiness is not available.

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

Loading configuration silently creates directories and a YAML file when the path does not exist.

Low
Category
Output Handling
Confidence
94% confidence
Finding

YamlUtil.load performs filesystem writes without a comment, docstring, log, or confirmation disclosing that loading can create files. BaseEnum.init_subclass invokes this loader during class creation (L053 and L058), so importing the module can modify the filesystem without an explicit save request.

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:

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