Back to skill

Security audit

Child Bedtime Soothing (Fear of Dark / Post-Nightmare) | 儿童睡前情绪安抚(怕黑/噩梦后)

Security checks for vulnerabilities and agentic risk

Overview

This skill handles highly sensitive child-bedroom audio/video and cloud report history with silent identity and token persistence, while also claiming automatic soothing actions that the inspected code does not implement.

Review this carefully before installing. Use it only in a clearly single-user, consented environment, and assume child media or media URLs may be sent to the configured cloud service. Do not rely on it for real-time soothing, parent alerts, or safety escalation unless those actions are separately implemented and verified. Avoid shared workspaces unless identity isolation and token storage are fixed.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
skills/smyx_common/scripts/util.py:429
Finding

Workspace-Wide Fallback Identity Can Expose Reports Across Users

Content
View full analysis

Vulnerability Details

File Location: skills/smyx_common/scripts/util.py:429-458; related call site: scripts/smyx_child_bedtime_soothing_analysis.py:59-67
Vulnerability Type: Shared fallback identity causing cross-user report access
Risk Level: High

Complete Code Snippet

python
@classmethod
def get_or_create_default_open_id(cls):
    from .dao import UserDao, User
    import uuid

    user_dao = UserDao()
    user = user_dao.get_first_default_user(cls.DEFAULT_PREFIX, cls.DEFAULT_USERNAME_LENGTH)
    if user and user.username:
        return user.username

    for _ in range(10):
        username = cls.generate_default_open_id()
        if user_dao.get_by_username(username):
            continue
        now = datetime.now()
        user = User(
            id=uuid.uuid4().hex,
            username=username,
            realname=username,
            source=ConstantEnum.APP__SOURCE,
            del_flag=0,
            create_time=now,
            update_time=now
        )
        user_dao.add(user)
        return username

    raise RuntimeError("Failed to generate a default open-id after repeated collisions")

@classmethod
def resolve_current_open_id(cls, open_id=None, use_current=True):
    resolved_open_id = (open_id or "").strip() if isinstance(open_id, str) else open_id
    if not resolved_open_id and use_current:
        resolved_open_id = ConstantEnum.CURRENT__OPEN_ID or ConstantEnum.CURRENT__USER_NAME
    if not resolved_open_id:
        resolved_open_id = cls.get_api_key_file_open_id()
    if not resolved_open_id:
        resolved_open_id = cls.get_or_create_default_open_id()

    ConstantEnum.CURRENT__OPEN_ID = resolved_open_id
    if not ConstantEnum.CURRENT__USER_NAME:
        ConstantEnum.CURRENT__USER_NAME = resolved_open_id
    return resolved_open_id

The corresponding report-listing path is:

python
OpenIdUtil.resolve_current_open_id(args.open_id, use_current=bool(args.open_id))

if args.list:
    open_id = Consta
...[truncated 2493 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require a verified, per-request principal before allowing historical report access.
  2. Remove the workspace-global fallback identity from all multi-user execution paths.
  3. Bind locally cached cloud credentials to an authenticated user and tenant identifier rather than only to a shared workspace.
  4. Reject --list when a verified user binding is unavailable instead of silently using the first default account.
  5. Add server-side authorization checks that derive report ownership from the authenticated token rather than accepting a client-selected identity.
  6. Store separate credential databases or records for each authenticated Agent user, with restrictive filesystem permissions.
  7. Invalidate existing shared fallback tokens and migrate reports to properly isolated identities.
  8. Add integration tests using two callers in one workspace to verify that neither caller can list or retrieve the other caller’s reports.

other

Warning
Location
SKILL.md:23
Finding

Safety-Critical Automatic Soothing and Parent Alerts Are Claimed but Not Implemented

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:23-41; executable paths: scripts/smyx_child_bedtime_soothing_analysis.py:21-28 and skills/smyx_analysis/scripts/skill.py:70-87
Vulnerability Type: Safety-critical capability misrepresentation
Risk Level: Medium

Complete Evidence Snippets

The Skill documentation states:

text
When such unrest is detected, the system automatically triggers soothing actions:
turning on a soft night light, playing a pre-recorded story from the mother, or
playing a gentle lullaby.

It also describes a workflow that includes night-light control, audio playback, parent application notifications, and emergency wake-up actions.

The actual top-level analysis method only delegates to the analysis service:

python
def analyze_video(input_path=None, url=None, pet_type=None, api_url=None, api_key=None, output_level=None):
    if pet_type:
        ConstantEnum.DEFAULT__PET_TYPE = pet_type

    input_path = input_path or url
    return skill.get_output_analysis(input_path)

The inherited implementation only starts analysis, polls for a result, and renders output:

python
def get_output_analysis(self, input_path, params={}, *args, **argss):
    response = self.get_analysis(
        input_path, params,
        *args, **argss
    )

    def _analysis_result():
        return self.analysis_result(
            data=response
        )

    output_content = response
    if type(response) == dict:
        new_response = CommonUtil.polling(
            _analysis_result,
            check_condition=lambda res: res.get('needPageRefresh') is False,
            interval=5,
            max_attempts=24
        )
        output_content = self.get_output_analysis_content(new_response)
    return output_content

Technical Analysis

The documented behavior creates an expectation that the Skill actively controls a night light, plays soothing audio, sends parent notifications, and escalates urgent events. Static inspe ...[truncated 2015 chars]

Remediation
View remediation

Remediation Suggestions

  1. Either implement the documented action workflow or explicitly describe the Skill as analysis-only.
  2. If automatic actions are implemented:
    • Use authenticated, user-bound device registrations.
    • Validate that target lights, speakers, and parent applications belong to the current user.
    • Enforce documented brightness and volume limits in executable code.
    • Require delivery acknowledgements for parent notifications.
    • Escalate failed urgent notifications through a defined fallback channel.
    • Record auditable action outcomes without exposing child media or credentials.
  3. Remove statements that actions are “automatically triggered” until end-to-end execution and delivery are technically enforced.
  4. Distinguish recommendations returned by the analysis API from actions that have actually been performed.
  5. Display a clear warning when no compatible device or parent-notification channel is configured.
  6. Add integration tests proving that each documented severity level invokes the expected device and notification actions.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (59)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill appears to combine external API communication, token/auth handling, local file access, and creation of user/open-id records while presenting itself as a simple child bedroom soothing feature. In this context, undisclosed identity persistence and external transmission of minors' bedroom media substantially raise privacy and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill appears to combine external API communication, token/auth handling, local file access, and creation of user/open-id records while presenting itself as a simple child bedroom soothing feature. In this context, undisclosed identity persistence and external transmission of minors' bedroom media substantially raise privacy and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill appears to combine external API communication, token/auth handling, local file access, and creation of user/open-id records while presenting itself as a simple child bedroom soothing feature. In this context, undisclosed identity persistence and external transmission of minors' bedroom media substantially raise privacy and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to combine external API communication, token/auth handling, local file access, and creation of user/open-id records while presenting itself as a simple child bedroom soothing feature. In this context, undisclosed identity persistence and external transmission of minors' bedroom media substantially raise privacy and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill appears to combine external API communication, token/auth handling, local file access, and creation of user/open-id records while presenting itself as a simple child bedroom soothing feature. In this context, undisclosed identity persistence and external transmission of minors' bedroom media substantially raise privacy and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to combine external API communication, token/auth handling, local file access, and creation of user/open-id records while presenting itself as a simple child bedroom soothing feature. In this context, undisclosed identity persistence and external transmission of minors' bedroom media substantially raise privacy and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to combine external API communication, token/auth handling, local file access, and creation of user/open-id records while presenting itself as a simple child bedroom soothing feature. In this context, undisclosed identity persistence and external transmission of minors' bedroom media substantially raise privacy and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to combine external API communication, token/auth handling, local file access, and creation of user/open-id records while presenting itself as a simple child bedroom soothing feature. In this context, undisclosed identity persistence and external transmission of minors' bedroom media substantially raise privacy and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to combine external API communication, token/auth handling, local file access, and creation of user/open-id records while presenting itself as a simple child bedroom soothing feature. In this context, undisclosed identity persistence and external transmission of minors' bedroom media substantially raise privacy and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to combine external API communication, token/auth handling, local file access, and creation of user/open-id records while presenting itself as a simple child bedroom soothing feature. In this context, undisclosed identity persistence and external transmission of minors' bedroom media substantially raise privacy and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to combine external API communication, token/auth handling, local file access, and creation of user/open-id records while presenting itself as a simple child bedroom soothing feature. In this context, undisclosed identity persistence and external transmission of minors' bedroom media substantially raise privacy and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to combine external API communication, token/auth handling, local file access, and creation of user/open-id records while presenting itself as a simple child bedroom soothing feature. In this context, undisclosed identity persistence and external transmission of minors' bedroom media substantially raise privacy and compliance risk.

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-bedtime-soothing-analysis"
description: "Through a fixed camera (with infrared night vision) and microphone in the child's bedroom, the system analyzes pre-sleep and night-time video and audio to detect pre-sleep crying (continuous crying, calling 'Mama'), fear-of-the-dark expressions (curling up, looking around), and nightmare awakenings (sudden sitting up, trembling, screaming). | 通过儿童卧室的固定摄像头(红外夜视)及麦克风,分析儿童睡前及夜间视频,检测睡前哭闹(持续性哭声、呼喊'妈妈')、怕黑表现(身体蜷缩、四处张望)、噩梦惊醒(突然坐起�

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill describes continuous nighttime surveillance of a child's bedroom with cloud-backed reporting, yet the documentation lacks a strong privacy warning, consent model, or detailed data-handling safeguards. Because the subject is a minor in a private bedroom, insufficient privacy disclosure and controls make the impact significantly more severe than ordinary camera analytics.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The User model stores token and open_token fields even though the skill's stated function is child bedroom monitoring and automated soothing, not authentication or account federation. Retaining credentials or bearer-style tokens in a local shared SQLite database creates a high-value target and materially increases harm if the host or database is accessed by another component or attacker.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This utility code performs authenticated outbound API access, token management, and even automatic external account provisioning, which is unrelated to the manifest's stated local child-bedroom soothing analysis behavior. In the context of a highly sensitive childcare surveillance skill, hidden backend connectivity and identity bootstrapping materially expand the privacy and security boundary and can exfiltrate metadata, identifiers, or other collected data off-device without clear user expectation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares no explicit tool scope even though its documented behavior implies shell execution, local file access, network access, environment use, and file writes. Missing permission boundaries makes it easier for an agent runtime to over-grant capabilities and for users to be unaware that sensitive child-bedroom media and local state may be accessed or transmitted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The description is hard-coded as Chinese plus English content, and the document consistently presents a fixed bilingual format without stating that users may choose their preferred language. Under the language/locale policy, fixed language behavior without opt-in or justification can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documented behavior expands from analysis/soothing into cloud history queries and report-link distribution without that broader scope being clearly disclosed in the manifest. This is risky because it changes the data lifecycle from transient processing to searchable/reportable records for highly sensitive child-bedroom monitoring data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Automatic identity initialization, fallback to a local default user, and silent user-record creation are undocumented behaviors that materially alter the privacy model of the skill. This is especially concerning because the content involves children's bedroom audio/video, making hidden identity association more sensitive than in ordinary media analysis.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The requirement to auto-create or reuse a local default user is not justified by the stated purpose and introduces unnecessary identity persistence. Unneeded user linkage increases the risk of cross-session tracking and unauthorized access to historical child-monitoring data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The user-facing string at L17 is hard-coded in Chinese, which imposes a specific language on the skill's output. The file does not show any opt-in, language selection, or justification that this skill is intentionally limited to a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes analysis of a child's bedroom audio/video for bedtime distress signals, but the main analysis function accepts a pet_type argument and writes it into ConstantEnum.DEFAULT__PET_TYPE. That indicates reuse of animal/pet-oriented semantics that do not match the declared child-focused scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest says that when distress is detected, the system automatically triggers soothing actions such as turning on a night light and playing prerecorded audio. In this file, the implemented behavior is limited to analyzing an input or showing history, then printing/saving the analysis output; there is no code here that controls a light, plays audio, or otherwise triggers soothing actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code resolves an internal identity automatically via OpenIdUtil.resolve_current_open_id(args.open_id, use_current=bool(args.open_id)) while suppressing the open-id and api-key options from normal help output. In a child-bedroom audio/video monitoring context, hidden identity binding can cause analysis results or history retrieval to be linked to or disclosed under an internal account without clear user awareness, increasing privacy and authorization risk.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.install_untrusted_source

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
skills/smyx_common/scripts/config-dev.yaml:2