Back to skill

Security audit

Video-based Fall Detection Skill | 跌倒检测视频版技能

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its fall-detection purpose, but it handles sensitive home video, cloud identity, and reusable tokens with weak disclosure and unsafe defaults, so it should go to Review before installation.

Install only if you are comfortable with sensitive monitoring videos being uploaded to a cloud service, automatic internal account creation, cloud history lookups, and local plaintext credential storage. This package should use HTTPS-only production endpoints, explicit user consent for uploads/history queries, documented data retention, scoped authentication, and secure token storage before handling private home footage.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
skills/smyx_common/scripts/config-dev.yaml:2
Finding
Sensitive video, identity, and authentication data transmitted over plaintext HTTP## Vulnerability Details **File Location**: `skills/smyx_common/scripts/config.yaml:15`; `skills/smyx_common/scripts/config-dev.yaml:2-4`; `skills/smyx_analysis/scripts/skill.py:113-130`; `skills/smyx_common/scripts/util.py:541-561, 610-646` **Vulnerability Type**: Plaintext transmission of sensitive information **Risk Level**: High ### Vulnerable Code The default configuration activates the development profile: ```yaml env: dev ``` That profile replaces the HTTPS production services with plaintext HTTP endpoints: ```yaml ApiEnum: base-url-open-api: "http://192.168.1.234:9601/smyx-open-api" base-url-open-h5: "http://192.168.1.234:4100" base-url-health: "http://192.168.1.234:7070/jeecg-boot-xzgz" ConstantEnum: is-debug: true ``` Local monitoring videos are read and supplied to the request layer for upload: ```python if (input_path.startswith("http://") or input_path.startswith("https://")): params.update({ "videoUrl": input_path }) else: _validate_file(input_path) mime_type, _ = mimetypes.guess_type(input_path) if mime_type is None: mime_type = 'application/octet-stream' with open(input_path, 'rb') as f: file_content = f.read() files = { 'file': (os.path.basename(input_path), file_content, mime_type) } ``` The registration request transmits the derived identity as both an Open ID and a mobile value: ```python def _get_or_create_user(username): _url = ApiEnum.BASE_URL_HEALTH + "/sys/phoneLogin" open_id = username _data = { "silent": 1, "register": 1, "openId": open_id, "mobile": username, "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_ ...[truncated 3999 chars]
Remediation
## Remediation Suggestions 1. Remove `env: dev` from the distributed production configuration and use the HTTPS production profile by default. 2. Require HTTPS for every endpoint carrying media, identities, tokens, reports, or analysis metadata. 3. Reject non-HTTPS URLs at runtime except for an explicitly enabled, localhost-only development mode. 4. Do not permit private-network development endpoints in production packages. 5. Retain normal TLS certificate and hostname verification and fail closed on certificate errors. 6. Add an endpoint allowlist so media and credentials can only be sent to documented, trusted service origins. 7. Avoid populating the `mobile` field with an internal identity unless that field is required and semantically correct. 8. Minimize transmitted identity attributes and prefer a random, installation-scoped pseudonymous identifier. 9. Clearly disclose that videos are uploaded to a cloud service and obtain user consent before transmitting sensitive monitoring footage. 10. Rotate any tokens that may already have crossed plaintext transport and review server logs for suspicious replay activity. 11. Add automated configuration tests that fail builds when production profiles contain `http://` service URLs.

T09 · Insecure Skill Coding Practices

Warning
Location
skills/smyx_common/scripts/dao.py:450
Finding
Authentication tokens stored in plaintext in a shared workspace database## Vulnerability Details **File Location**: `skills/smyx_common/scripts/dao.py:175-180, 450-462`; `skills/smyx_common/scripts/util.py:586-604` **Vulnerability Type**: Insecure storage of authentication credentials **Risk Level**: Medium ### Vulnerable Code The database is placed in the Agent workspace data directory and opened as an ordinary SQLite database: ```python if not db_path: db_path = "smyx-common-claw.db" db_path = self.get_db_path(db_path) self.engine = create_engine(f"sqlite:///{db_path}", echo=False) ``` The user model stores both authentication values directly in database columns: ```python class User(Base, BaseModelMixin): """User model""" __tablename__ = "sys_user" id = Column(String(32), primary_key=True, index=True) source_id = Column(String(32), comment="source id") username = Column(String(100), unique=True, index=True, nullable=False, comment="username") realname = Column(String(200), unique=True, index=True, comment="real name") email = Column(String(45), unique=True, index=True, comment="email") birthday = Column(DateTime, unique=True, index=True, comment="birthday") sex = Column(Integer, comment="sex") age = Column(Integer, comment="age") token = Column(String(500), comment="token") open_token = Column(String(1000), comment="open token") source = Column(String(50), comment="source") del_flag = Column(Integer, comment="deletion flag", default=0) create_time = Column(DateTime, default=func.now(), comment="creation time") update_time = Column( DateTime, default=func.now(), onupdate=func.now(), comment="update time" ) ``` Tokens returned by the remote registration process are copied into the model and persisted: ```python if not ApiEnum.TOKEN or not ApiEnum.OPEN_TOKEN: new_current_user = _get_or_create_user(current__user_name) if new_current_ ...[truncated 3070 chars]
Remediation
## Remediation Suggestions 1. Store bearer tokens in an operating-system credential manager, hardware-backed key store, or dedicated encrypted secret service rather than ordinary SQLite columns. 2. If database storage is unavoidable, encrypt each token using a key that is not stored alongside the database. 3. Apply owner-only permissions to the workspace data directory and database file at creation time. 4. Do not share the credential database across unrelated Skills; isolate credentials by Skill and Agent identity. 5. Use short-lived, narrowly scoped tokens and refresh them only when necessary. 6. Avoid persisting refresh or open tokens if an ephemeral access token is sufficient. 7. Add explicit logout, token revocation, and secure credential-deletion functionality. 8. Clear obsolete tokens when users change identity or uninstall the Skill. 9. Prevent tokens from entering workspace backups, diagnostic archives, or logs. 10. Document the credential lifecycle and periodically rotate existing persisted credentials.
Vulnerability Patterns
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (61)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The implementation reportedly performs authenticated HTTP communication, account resolution/creation, token handling, local workspace access, and helper utilities well beyond the advertised narrow purpose. In a surveillance-like home safety context, this hidden complexity raises material concerns around credential handling, unauthorized data collection, and unexpected persistence of sensitive footage or metadata.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The implementation reportedly performs authenticated HTTP communication, account resolution/creation, token handling, local workspace access, and helper utilities well beyond the advertised narrow purpose. In a surveillance-like home safety context, this hidden complexity raises material concerns around credential handling, unauthorized data collection, and unexpected persistence of sensitive footage or metadata.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The implementation reportedly performs authenticated HTTP communication, account resolution/creation, token handling, local workspace access, and helper utilities well beyond the advertised narrow purpose. In a surveillance-like home safety context, this hidden complexity raises material concerns around credential handling, unauthorized data collection, and unexpected persistence of sensitive footage or metadata.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The implementation reportedly performs authenticated HTTP communication, account resolution/creation, token handling, local workspace access, and helper utilities well beyond the advertised narrow purpose. In a surveillance-like home safety context, this hidden complexity raises material concerns around credential handling, unauthorized data collection, and unexpected persistence of sensitive footage or metadata.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The implementation reportedly performs authenticated HTTP communication, account resolution/creation, token handling, local workspace access, and helper utilities well beyond the advertised narrow purpose. In a surveillance-like home safety context, this hidden complexity raises material concerns around credential handling, unauthorized data collection, and unexpected persistence of sensitive footage or metadata.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The implementation reportedly performs authenticated HTTP communication, account resolution/creation, token handling, local workspace access, and helper utilities well beyond the advertised narrow purpose. In a surveillance-like home safety context, this hidden complexity raises material concerns around credential handling, unauthorized data collection, and unexpected persistence of sensitive footage or metadata.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The implementation reportedly performs authenticated HTTP communication, account resolution/creation, token handling, local workspace access, and helper utilities well beyond the advertised narrow purpose. In a surveillance-like home safety context, this hidden complexity raises material concerns around credential handling, unauthorized data collection, and unexpected persistence of sensitive footage or metadata.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The implementation reportedly performs authenticated HTTP communication, account resolution/creation, token handling, local workspace access, and helper utilities well beyond the advertised narrow purpose. In a surveillance-like home safety context, this hidden complexity raises material concerns around credential handling, unauthorized data collection, and unexpected persistence of sensitive footage or metadata.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The implementation reportedly performs authenticated HTTP communication, account resolution/creation, token handling, local workspace access, and helper utilities well beyond the advertised narrow purpose. In a surveillance-like home safety context, this hidden complexity raises material concerns around credential handling, unauthorized data collection, and unexpected persistence of sensitive footage or metadata.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The implementation reportedly performs authenticated HTTP communication, account resolution/creation, token handling, local workspace access, and helper utilities well beyond the advertised narrow purpose. In a surveillance-like home safety context, this hidden complexity raises material concerns around credential handling, unauthorized data collection, and unexpected persistence of sensitive footage or metadata.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The implementation reportedly performs authenticated HTTP communication, account resolution/creation, token handling, local workspace access, and helper utilities well beyond the advertised narrow purpose. In a surveillance-like home safety context, this hidden complexity raises material concerns around credential handling, unauthorized data collection, and unexpected persistence of sensitive footage or metadata.

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
Content
---
name: "fall-detection-video-analysis"
description: "Detects whether anyone has fallen within a target area. Supports video stream analysis and is suitable for real-time safety monitoring of elderly people living alone. | 跌倒检测视频版技能,检测目标区域内是否有人跌倒,支持视频流检测,适用于独居老人居家安全监测"
version: "1.0.14"
license: "MIT-0"
---

# 🚨 Video-based Fall Detection Skill | 跌倒检测视频版技能
> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询

---

## 🧭 技能概览 | Overview

| 模块 | 内容 |
|---|---|
Confidence
80% confidence
Finding
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Description-Behavior Mismatch

High
Confidence
96% confidence
Finding
This file exposes a generic API client layer with broad HTTP POST/PUT/GET/DELETE and CRUD-style helpers that are not scoped to fall-detection functionality. In the context of a narrowly described safety-monitoring skill, this overbroad capability materially increases the attack surface and can enable unintended access to arbitrary backend endpoints, data retrieval, or state changes if higher-level inputs are influenced by users or other components.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The add/edit/delete and generic HTTP method wrappers permit arbitrary resource mutation and broad network interaction beyond the declared purpose of the skill. In a plugin/agent setting, such capability expansion is dangerous because compromised or misused higher-level logic could invoke unintended backend operations, modify data, or pivot into other services under the guise of a simple fall-detection feature.

Description-Behavior Mismatch

High
Confidence
96% confidence
Finding
This utility file contains broad identity management, token handling, remote account provisioning, and generic API transport logic that is unrelated to fall-detection video analysis. That mismatch materially increases risk because installing a safety-monitoring skill also grants code paths that can create accounts, persist tokens, and transmit identity data to external services outside the user's expected purpose.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
This section creates default user identities, queries and writes local user records, and mutates global token-related state unrelated to fall detection. Such hidden identity bootstrapping can facilitate unauthorized persistence, account linkage, and subsequent authenticated requests under an identity the user never knowingly approved.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The code automatically logs in or registers users against a remote health-service endpoint using locally resolved identifiers, without any clear need for fall detection. Silent account creation and login can expose personal identifiers, create persistent remote accounts without consent, and bootstrap tokens for later API access.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill advertises and instructs use of capabilities that imply shell execution, file access, network access, and environment use, but it does not declare any explicit tool scope or allowed-tools restrictions in the manifest. This creates an over-privileged and weakly bounded execution model where a host agent may permit broader actions than users expect, increasing the chance of unsafe file, network, or command execution.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The default trigger is broad enough that the skill may auto-activate whenever a user provides a video that could be interpreted as fall-related, without stronger confirmation or scoping. Because the skill handles local files, network URLs, and remote APIs, accidental invocation can lead to unintended processing or transmission of sensitive home-monitoring media.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The history-query triggers use broad natural-language phrases such as requests to view history or report lists, which can cause the skill to fetch sensitive prior monitoring reports without sufficiently specific user intent. In this context, those reports may reveal private activity patterns, alert history, or links to exported analyses tied to an internal identity.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The operational instructions and trigger phrases are effectively specified only in Chinese for user-facing interaction patterns such as viewing historical reports. Although the document contains some bilingual headings, it does not clearly offer the user a choice of response language or locale, which can violate language/locale policy requirements.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The skill includes show_analyze_list(), which retrieves prior analysis records by open_id, expanding behavior beyond the stated purpose of analyzing a provided video for falls. In a safety-monitoring context, these records may contain sensitive monitoring history, so exposing list retrieval in the same tool can enable unintended disclosure of private activity data if access control is weak or internal identity is mis-bound.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
This code defines the command description and argument help text entirely in Chinese, and additional status/error messages later in the file are also Chinese-only. That enforces a specific language for users without opt-in, which matches the policy-violation category for language or locale restrictions.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The CLI performs hidden internal identity initialization via OpenIdUtil.resolve_current_open_id and suppresses the related argument from help output, even though identity resolution is unrelated to the core task of fall detection. This creates an undocumented capability that can bind actions to an internal user context and increases the risk of unauthorized data access or misuse, especially when combined with list/history retrieval behavior.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
This Python file performs network POST requests in `analysis_result` and `analysis`, passing through caller-supplied params/data to remote endpoints. There is no confirmation prompt, logging, print statement, docstring, or comment in this file disclosing that user or system data may be sent over the network.

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