Back to skill

Security audit

Regional Humanoid Detection Skill | 区域人形检测技能

Security checks for vulnerabilities and agentic risk

Overview

The skill is a cloud human-detection tool, but it can silently send surveillance media, identity data, and auth tokens to unencrypted development endpoints while creating persistent local identity state.

Review carefully before installing. Treat any analyzed video, video URL, platform identity, and generated report as data that may be sent to an external service and linked to a persistent account. The publisher should remove the development HTTP defaults, enforce HTTPS, document identity/account creation and report retention, and provide explicit user control before cloud history queries or media uploads.

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.yaml:4
Finding
Sensitive Surveillance Media and Authentication Credentials Transmitted over Plaintext HTTP<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/config.yaml:4-6,15`; `skills/smyx_common/scripts/config-dev.yaml:2-4`; `skills/smyx_analysis/scripts/skill.py:122-130`; `skills/smyx_common/scripts/util.py:610-612,646-647` **Vulnerability Type**: Plaintext transmission of sensitive data **Risk Level**: High ### Vulnerable Code `skills/smyx_common/scripts/config.yaml:4-6,15`: ```yaml base-url-health: https://lifeemergence.com/jeecg-boot-xzgz base-url-open-api: https://open.lifeemergence.com/smyx-open-api base-url-open-h5: http://livemonitor.lifeemergence.com env: dev ``` `skills/smyx_common/scripts/config-dev.yaml:2-4`: ```yaml 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" ``` `skills/smyx_analysis/scripts/skill.py:122-130`: ```python # 读取文件内容 with open(input_path, 'rb') as f: file_content = f.read() files = { 'file': (os.path.basename(input_path), file_content, mime_type) } ``` `skills/smyx_common/scripts/util.py:610-612,646-647`: ```python headers.setdefault("X-Access-Token", ApiEnum.TOKEN) headers.setdefault("X-Api-Key", ApiEnum.API_SECRET_KEY) headers.setdefault("Authorization", ApiEnum.OPEN_TOKEN) ``` ```python response = requests.request(method, url, *args, json=data, params=params, headers=headers, timeout=int(timeout), **argss) ``` ### Technical Analysis The packaged default configuration selects the development environment through `env: dev`. The configuration loader then applies `config-dev.yaml`, whose API, health, and web endpoints use unencrypted HTTP. When local video analysis is requested, the Skill reads the entire surveillance file and passes it to the remote analysis operation. The common request utility adds access tokens, API keys, authorization tokens, identity metadata, and request data before sending the request. It does not reject plainte ...[truncated 2009 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Change the packaged default environment to production and ensure all production endpoints use HTTPS. 2. Remove development configuration from release artifacts, or require an explicit developer-only opt-in that cannot be enabled by ordinary Skill input. 3. Reject any non-HTTPS remote URL in `RequestUtil.http_request` unless it resolves to an explicitly approved loopback test endpoint. 4. Do not permit authentication headers or sensitive media to be sent when the destination scheme is HTTP. 5. Enforce normal TLS certificate and hostname validation; do not introduce `verify=False`. 6. Use a strict allowlist of approved API hostnames to prevent credentials from being forwarded to unintended destinations. 7. Rotate any credentials that may previously have traversed plaintext endpoints. 8. Add automated tests and release checks that fail when packaged configuration contains plaintext service URLs or selects a development environment. 9. Minimize credential scope and lifetime so intercepted tokens cannot access unrelated API operations. ]]>

other

Warning
Location
skills/smyx_common/scripts/config.py:155
Finding
Silent Disclosure and Remote Registration of Upstream Platform Identity<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/config.py:155-163`; `skills/smyx_common/scripts/util.py:551-562,576-578,623-624` **Vulnerability Type**: Undisclosed identity collection and transmission **Risk Level**: Medium ### Vulnerable Code `skills/smyx_common/scripts/config.py:155-163`: ```python openclaw_sender_open_id = os.environ.get("OPENCLAW_SENDER_OPEN_ID") openclaw_sender_username = os.environ.get("OPENCLAW_SENDER_USERNAME") feishu_open_id = os.environ.get("FEISHU_OPEN_ID") if openclaw_sender_open_id: cls.CURRENT__OPEN_ID = openclaw_sender_open_id if openclaw_sender_username: cls.CURRENT__USER_NAME = openclaw_sender_username if feishu_open_id: cls.FEISHU_APP__RECEIVE_ID = feishu_open_id ``` `skills/smyx_common/scripts/util.py:551-562`: ```python _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) ``` `skills/smyx_common/scripts/util.py:576-578,623-624`: ```python if not (ApiEnum.API_SECRET_KEY or ConstantEnum.CURRENT__USER_NAME or ConstantEnum.CURRENT__OPEN_ID): OpenIdUtil.resolve_current_open_id(use_current=False) current__user_name = ApiEnum.API_SECRET_KEY or ConstantEnum.CURRENT__USER_NAME or ConstantEnum.CURRENT__OPEN_ID ``` ```python if current__user_name: data.setdefault('pnaUserName', current__user_name) ``` ### Technical Analysis The Skill automatically reads sender identifiers and usernames from process environment variables. These values are then used as the current remote identity. If cached service tokens are unavailable, the code performs a silent registration or login request and places the same identifier in both the `openId` and `mobile` fields. Subsequent API requests include the identity as `pnaUserName`. The Skill documentation states that identity assoc ...[truncated 2011 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Default to a cryptographically random, Skill-scoped pseudonymous identifier rather than an upstream platform sender identifier. 2. Require an explicit and documented consent decision before transmitting an upstream identity to the remote service. 3. Clearly disclose the recipient, purpose, fields transmitted, retention period, account-deletion process, and relationship between identity and uploaded media. 4. Never place a username or open identifier in a field named `mobile` unless it is genuinely a validated mobile number and that use is necessary and consented to. 5. Separate account creation from ordinary analysis requests; do not silently register a remote account merely because cached credentials are absent. 6. Scope pseudonymous identifiers per service or deployment to prevent cross-service correlation. 7. Provide a way to revoke the identity association and delete remotely stored reports and account data. 8. Ensure all identity traffic uses HTTPS and apply the transport protections described in the first finding. 9. Avoid retaining remote access tokens in plaintext local database fields where feasible; use operating-system credential storage or encryption with access controls. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (29)

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Content
if filters:
                for key, value in filters.items():
                    query = query.filter(getattr(self.__model__, key) == value)

            if offset:
                query = query.offset(offset)
Confidence
81% confidence
Finding
The filter keys come from the caller and are passed into getattr(self.__model__, key) without an allowlist. While SQLAlchemy still parameterizes values and this is not classic SQL injection, an attacker who controls filter keys can access unintended model attributes, trigger exceptions for denial of service, or bypass intended query restrictions by selecting sensitive columns the caller should not be able to query on. In this skill context, the model includes identity fields and tokens, making unconstrained querying more sensitive than the stated human-detection purpose suggests.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Content
if filters:
                for key, value in filters.items():
                    query = query.filter(getattr(self.__model__, key) == value)

            return query.scalar()
        finally:
Confidence
80% confidence
Finding
This count() method repeats the same caller-controlled dynamic attribute lookup as list(), allowing untrusted filter keys to influence query construction. Although it is not raw SQL injection, it can still enable unauthorized probing of schema/business fields and cause predictable exceptions that degrade service availability. Because this module stores user identity and token-related data unrelated to the advertised CV function, the overbroad query surface is more concerning.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill advertises and documents capabilities requiring shell, network, local file read/write, and implicit environment access, but declares no permissions or user-facing trust boundaries. This is dangerous because the agent may execute sensitive operations without explicit review, increasing the risk of unintended data exposure, unauthorized persistence, or remote interaction beyond what a user expects from a vision-analysis skill.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The documented purpose is human detection, but the skill also performs identity persistence, history retrieval, report URL construction, and remote registration/login flows. That mismatch is dangerous because users may provide media for analysis without realizing the skill can create accounts, correlate identity across sessions, and expose prior report metadata through backend services.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
Automatic reuse or creation of a local default user introduces hidden identity state unrelated to the core task of detecting people in video. This can silently link user activity across sessions, persist identifiers on disk, and cause backend actions to be attributed to a local account without informed consent.

Intent-Code Divergence

High
Confidence
97% confidence
Finding
The file documents pet health analysis APIs even though the skill is घोषित as a human-detection/computer-vision capability. This mismatch can cause the agent or operators to invoke the wrong backend, mishandle data types and permissions, or expose unrelated health-report functionality under a misleading skill identity, which is a classic capability-confusion and supply-chain integrity problem.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The enumerated API surface clearly targets pet health analysis and report export rather than personnel detection. If this skill is wired to those endpoints, a user expecting video-based human detection could unintentionally trigger access to unrelated medical-style records or exports, leading to unauthorized data exposure and dangerous operator confusion.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The function exposes a user-specific analysis history listing that is not necessary for the advertised task of analyzing a provided video for human detection. Even though it uses an internal open_id flow, this expands the skill from single-input analysis into retrieval of prior user-associated records, which can leak behavioral or operational history if invoked unintentionally or by an unauthorized caller.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill resolves an internal user identity automatically despite being presented as a detection tool for user-supplied media. Implicit identity resolution creates hidden access to user-linked backend data and can combine with list/export functions to retrieve or correlate records without transparent user awareness.

Description-Behavior Mismatch

Medium
Confidence
84% confidence
Finding
The skill accepts arbitrary local files and arbitrary remote URLs, then forwards them to a generic backend analysis service without enforcing that the content or operation is specifically for human-detection use. In this skill context, that broadens the feature into a general file/URL submission proxy, which can enable unintended data exfiltration, misuse of backend analysis capabilities, or policy bypass if users assume the skill is limited to personnel detection.

Context-Inappropriate Capability

Medium
Confidence
83% confidence
Finding
This file exposes generic add/edit/delete and arbitrary HTTP verb wrappers that are not specific to human-detection analysis, materially expanding the skill’s capabilities beyond its stated purpose. In an agent/skill context, such broad network and CRUD primitives can be reused to access, modify, or delete remote resources if other parts of the skill or calling code can influence the URL or payloads, increasing the risk of unauthorized actions and data exfiltration.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
The file defines persistence for usernames, real names, email, birthday, token, and open_token, which is outside the stated human-detection/video-analysis function. Collecting and storing identity/token data without clear necessity increases privacy and credential exposure risk, and broadens the attack surface if the local database is accessed or mishandled.

Context-Inappropriate Capability

Medium
Confidence
85% confidence
Finding
The module automatically creates a local SQLite database and performs schema migration logic, capabilities that are not obviously required for a human-detection analysis skill. This introduces hidden statefulness, local data retention, and a persistence layer that can store sensitive records across runs, increasing privacy and forensic risk if the workspace is shared or compromised.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The utility layer performs remote account provisioning, token acquisition, token caching, and identity initialization that are unrelated to the stated human-detection function. This expands the skill's authority and data handling surface, enabling silent creation/use of external identities and outbound authentication flows without clear user consent, which is especially risky in a computer-vision monitoring skill where such backend behavior is unexpected.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The code reads an identity value from a workspace file, reuses local user records, and creates persistent default open-id identities when none are provided. This is dangerous because it silently binds executions to local identity/credential material and persists identifiers across runs, creating privacy, impersonation, and unauthorized service-use risks outside the skill's declared local detection scope.

Vague Triggers

Medium
Confidence
85% confidence
Finding
The trigger rules for historical report queries are broad enough that ordinary requests about reports or history may cause automatic cloud queries. In this context, that can disclose prior analysis metadata or fetch user-linked records when the user intended only a general question, creating privacy and overreach risks.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill states that uploaded attachments or video/image files are automatically saved locally, but does not prominently warn users about this storage behavior, retention, or location. Silent local persistence is dangerous because sensitive surveillance footage may remain on disk beyond the immediate task and become accessible to other processes or users.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation omits a clear warning that user-provided URLs and report/history queries involve cloud API access and remote downloading by the service. This is dangerous because users may unknowingly send surveillance content or internal URLs to third-party infrastructure, potentially leaking sensitive media, metadata, or network targets.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill sends a local file path or remote URL into an external analysis function without any explicit notice about transmission, retention, or processing of the referenced video. In a surveillance context, the content may include sensitive footage of people or restricted areas, so silent backend submission creates privacy and data-governance risk.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
This code reads the entire local file and uploads it to the analysis backend without any user-facing confirmation, notice, or consent step in this path. That is dangerous because users may unknowingly transmit sensitive video or image data, especially in a surveillance-oriented skill handling personnel footage from offices or restricted areas.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
Remote URLs are passed directly to the backend analysis service with no user-facing disclosure in this code path. In a monitoring skill, this can cause users to submit private camera streams or internal endpoints without realizing they are being relayed to an external service, creating confidentiality and governance risks.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The constructor silently resolves a database path and initializes a SQLite database without any user-facing disclosure or consent flow. Hidden creation of local state can surprise operators, retain sensitive data unintentionally, and make incident response harder because the skill behaves beyond its advertised real-time detection purpose.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The code performs automatic ALTER TABLE changes on startup without user-facing disclosure, changing persistent state implicitly. Undisclosed schema mutation can preserve or expand sensitive data storage over time and complicate trust, rollback, and compliance expectations for a skill that is ostensibly about CV-based personnel detection.

Missing User Warnings

Medium
Confidence
83% confidence
Finding
FileUtil.open() always opens the supplied path for writing, which can overwrite files silently if called with untrusted or mistaken paths. In an agent skill context, undisclosed write capability is more concerning because it can modify workspace state or supporting files unrelated to human detection.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The HTTP utility automatically attaches identity and token headers and sends user-related fields such as pnaUserName and tenant/skill metadata to external endpoints. This is dangerous because it can silently transmit identifiers and authentication material during normal skill operation, which is unexpected for a human-detection skill and increases privacy and misuse risk if endpoints or logs are compromised.

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