Back to skill

Security audit

Virtual Fence Crossing Alert Skill | 虚拟围栏越界预警技能

Security checks for vulnerabilities and agentic risk

Overview

This skill performs cloud video analysis but also silently creates or reuses account identity, stores tokens, and supports hidden identity selection around sensitive child/home media.

Review this skill carefully before installing, especially if it will process videos of children or inside a home. It sends media or media URLs to a cloud service, silently links work to an internal identity, creates or reuses a local account record, and stores returned tokens in a shared workspace database. It should ideally require explicit consent for uploads and authentication, remove hidden identity overrides, and protect or avoid persistent token storage.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/virtual_fence_intrusion_warning_analysis.py:40
Finding

Unverified Open ID permits cloud account impersonation

Content
View full analysis

Vulnerability Details

File Location: scripts/virtual_fence_intrusion_warning_analysis.py:40-60; skills/smyx_common/scripts/util.py:458-471, 545-561, 578-612
Vulnerability Type: Improper authentication and caller-controlled identity impersonation
Risk Level: Medium

Vulnerable Code

scripts/virtual_fence_intrusion_warning_analysis.py:40-60

python
parser.add_argument("--open-id", required=False, help=argparse.SUPPRESS)
parser.add_argument("--list", action='store_true', help="显示虚拟围栏越界预警分析列表清单")
parser.add_argument("--api-url", help="服务端API地址")
parser.add_argument("--api-key", help=argparse.SUPPRESS)
parser.add_argument("--output", help="结果输出文件路径")
parser.add_argument("--detail", choices=["basic", "standard", "json"],
                    default=ConstantEnum.DEFAULT__OUTPUT_LEVEL,
                    help="输出详细程度")
parser.add_argument("--export-env-only", action='store_true',
                    help="仅输出 export 命令设置环境变量,不执行分析")

args = parser.parse_args()

try:
    # 初始化内部用户身份;不要求用户输入,也不在帮助信息中展示。
    OpenIdUtil.resolve_current_open_id(args.open_id, use_current=bool(args.open_id))

    # 检查必需参数
    if args.list:
        open_id = ConstantEnum.CURRENT__OPEN_ID
        result = show_analyze_list(open_id)

skills/smyx_common/scripts/util.py:458-471

python
@classmethod
def resolve_current_open_id(cls, open_id=None, use_current=True):
    """解析并初始化当前 open-id,返回最终使用值。"""
    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
...[truncated 5002 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove --open-id from the public command-line entry point. An internal identity parameter must not be accepted from ordinary Skill callers.
  2. Derive identity only from a trusted, authenticated runtime channel. For Agent integrations, require a signed assertion containing the user identity, audience, issuer, expiration time, and nonce.
  3. Change the backend authentication flow so that possession of an Open ID or mobile string is insufficient to receive access tokens. Require a normal authentication challenge or a cryptographically verified platform assertion.
  4. Validate that any supplied identity exactly matches the authenticated caller before issuing or selecting credentials. Reject mismatches rather than silently switching accounts.
  5. Separate registration from login. Do not combine silent login and automatic registration for arbitrary caller-provided identifiers.
  6. Bind cached tokens to the authenticated principal, workspace, issuer, and tenant. Do not look up credentials solely by an unverified username.
  7. Store tokens in a protected credential store with restrictive permissions, and invalidate credentials created through the vulnerable flow.
  8. Add tests confirming that caller-supplied identity overrides are rejected and that one authenticated user cannot list or create reports under another user's Open ID.
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (63)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to perform backend HTTP communication, automatic user/account creation, persistent identity generation, token management, and local file access while being marketed as a baby-safety virtual-fence analyzer. Automatic identity creation and persistent linkage are particularly sensitive when processing family video, and the mismatch hides material privacy and security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to perform backend HTTP communication, automatic user/account creation, persistent identity generation, token management, and local file access while being marketed as a baby-safety virtual-fence analyzer. Automatic identity creation and persistent linkage are particularly sensitive when processing family video, and the mismatch hides material privacy and security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to perform backend HTTP communication, automatic user/account creation, persistent identity generation, token management, and local file access while being marketed as a baby-safety virtual-fence analyzer. Automatic identity creation and persistent linkage are particularly sensitive when processing family video, and the mismatch hides material privacy and security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to perform backend HTTP communication, automatic user/account creation, persistent identity generation, token management, and local file access while being marketed as a baby-safety virtual-fence analyzer. Automatic identity creation and persistent linkage are particularly sensitive when processing family video, and the mismatch hides material privacy and security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to perform backend HTTP communication, automatic user/account creation, persistent identity generation, token management, and local file access while being marketed as a baby-safety virtual-fence analyzer. Automatic identity creation and persistent linkage are particularly sensitive when processing family video, and the mismatch hides material privacy and security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to perform backend HTTP communication, automatic user/account creation, persistent identity generation, token management, and local file access while being marketed as a baby-safety virtual-fence analyzer. Automatic identity creation and persistent linkage are particularly sensitive when processing family video, and the mismatch hides material privacy and security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to perform backend HTTP communication, automatic user/account creation, persistent identity generation, token management, and local file access while being marketed as a baby-safety virtual-fence analyzer. Automatic identity creation and persistent linkage are particularly sensitive when processing family video, and the mismatch hides material privacy and security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to perform backend HTTP communication, automatic user/account creation, persistent identity generation, token management, and local file access while being marketed as a baby-safety virtual-fence analyzer. Automatic identity creation and persistent linkage are particularly sensitive when processing family video, and the mismatch hides material privacy and security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to perform backend HTTP communication, automatic user/account creation, persistent identity generation, token management, and local file access while being marketed as a baby-safety virtual-fence analyzer. Automatic identity creation and persistent linkage are particularly sensitive when processing family video, and the mismatch hides material privacy and security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to perform backend HTTP communication, automatic user/account creation, persistent identity generation, token management, and local file access while being marketed as a baby-safety virtual-fence analyzer. Automatic identity creation and persistent linkage are particularly sensitive when processing family video, and the mismatch hides material privacy and security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to perform backend HTTP communication, automatic user/account creation, persistent identity generation, token management, and local file access while being marketed as a baby-safety virtual-fence analyzer. Automatic identity creation and persistent linkage are particularly sensitive when processing family video, and the mismatch hides material privacy and security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to perform backend HTTP communication, automatic user/account creation, persistent identity generation, token management, and local file access while being marketed as a baby-safety virtual-fence analyzer. Automatic identity creation and persistent linkage are particularly sensitive when processing family video, and the mismatch hides material privacy and security implications.

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

The YARA hit for metadata poisoning is not conclusive on its own, but in this file it coincides with heavily promotional metadata and substantial description/behavior mismatch. Poisoned or manipulative manifest metadata can mislead tool selection, safety review, or runtime routing, especially when paired with undeclared capabilities and hidden backend behaviors.

Content

Scanner excerpt · SKILL.md (reported line 3)May include surrounding context.

md
---
name: "virtual-fence-intrusion-warning-analysis"
description: "Customizes safety zones, identifies babies crawling out or approaching dangerous areas such as bedsides/windowsills, and immediately alerts to protect baby safety. | 虚拟围栏越界预警技能,自定义安全区域,识别婴儿爬出、靠近床边/窗台危险区域立即报警,守护宝宝安全"
version: "1.0.20"
license: "MIT-0"
---

# 🚧 Virtual Fence Crossing Alert Skill | 虚拟围栏越界预警技能
> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询

---

## 🧭 技能概览 | Overview

| 模块 | 内容 |
|

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file exposes broad generic network primitives and CRUD wrappers that are not constrained to the stated baby-safety virtual-fence purpose. Because callers can supply arbitrary URLs and payloads, the skill can be repurposed as a general remote-request client, increasing the risk of unauthorized outbound access, unexpected data transmission, or destructive remote actions if other parts of the skill accept untrusted input.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The User model stores account/profile information plus token and open_token values, which are highly sensitive and not justified by the stated baby safety-analysis purpose. If accessed by other skills sharing the workspace database or by an attacker with local access, these secrets could enable account takeover, cross-service abuse, or broader privacy compromise.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code reads a workspace identity file, falls back to local database identities, and creates persistent default users when none exist. For a baby intrusion-warning skill, this is unjustified hidden identity management that can silently establish a durable account context and enable later external API use without meaningful user awareness.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This utility code performs automatic account lookup, registration/login, token acquisition, and persistence of returned credentials, which is far broader than what a virtual-fence baby-safety skill should need. In context, this creates an undisclosed identity and network side effect path that can transmit user-linked identifiers off-device and expand the blast radius if the helper is invoked by unrelated functionality.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill requests or implies powerful capabilities—environment access, file read/write, network, and shell execution—yet declares no explicit tool scope or permission boundaries in the manifest. This creates an over-privileged and opaque trust model where reviewers and runtime policy cannot clearly constrain what the skill is allowed to do.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description emphasizes safety analysis but does not clearly warn users that provided videos or URLs may be transmitted to a cloud service for processing and reporting. This is a significant privacy transparency issue because the content likely contains children, household interiors, and other highly sensitive personal data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The default trigger condition is broad enough to activate on generic mentions of monitoring video and virtual-fence-style analysis, which can cause the skill to run unexpectedly on sensitive media. In a skill with networked backend processing and historical report access, ambiguous auto-triggering increases the chance of unauthorized or surprising data transmission.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The function show_analyze_list(open_id, ...) exposes retrieval of analysis-history records keyed by an internal identity, which is not necessary for the advertised purpose of analyzing a single baby-safety video for virtual-fence intrusion. This expands the skill from media analysis into account-scoped data access, creating unnecessary privacy and authorization risk if list access is not strictly constrained elsewhere.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file contains natural-language descriptions and help text exclusively in Chinese for the argument parser, and later prints Chinese-only status/error messages. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the tool is explicitly documented as region-specific, which is not shown here.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The CLI resolves an internal open_id identity even though the tool's stated role is local or URL-based baby intrusion analysis. Pulling identity context into a safety-analysis utility increases the chance of hidden account linkage, cross-user data access, or privacy-sensitive behavior that users would not expect from the declared functionality.

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

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