Back to skill

Security audit

Pet Toy Interaction Activity Analysis | 宠物玩具互动活跃度分析

Security checks for vulnerabilities and agentic risk

Overview

The skill’s core cloud video-analysis purpose is plausible, but it also creates/uses remote accounts and stores authentication tokens locally without clear user-facing disclosure.

Review before installing. This skill sends pet videos or video URLs to Life Emergence cloud APIs and requires an open-id, username, or phone number for saved reports. It may silently create/use a remote account and store returned tokens in a local SQLite database, so install only if that identity, cloud history, and credential-retention behavior is acceptable.

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

T09 · Insecure Skill Coding Practices

Warning
Location
skills/smyx_common/scripts/util.py:326
Finding
Authentication Tokens Are Persisted in an Unencrypted SQLite Database<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/util.py:326-348`; `skills/smyx_common/scripts/dao.py:64-69, 326-333` **Vulnerability Type**: Plaintext storage of authentication credentials **Risk Level**: Medium ### Vulnerable Code ```python found_user = user_dao.get_by_username(current__user_name) if found_user: ApiEnum.TOKEN = found_user.token ApiEnum.OPEN_TOKEN = found_user.open_token if not ApiEnum.TOKEN or not ApiEnum.OPEN_TOKEN: new_current_user = _get_or_create_user(current__user_name) if new_current_user: ApiEnum.TOKEN = new_current_user.get("token") ApiEnum.OPEN_TOKEN = new_current_user.get("openToken") current_user_info = new_current_user.get("userInfo") if current_user_info: current_user_info["token"] = new_current_user.get("token") current_user_info["openToken"] = new_current_user.get( "openToken") user_model = User.load(current_user_info) user = user_dao.save( user_model ) ``` The database is created as a regular workspace file: ```python parent_dir = os.path.join(workspace, "data") FileUtil.mkdir(parent_dir) db_path = os.path.join(parent_dir, db_path) return db_path ``` The token values are ordinary plaintext columns: ```python token = Column(String(500), comment="token") open_token = Column(String(1000), comment="open token") ``` ### Technical Analysis After the remote login or registration operation returns authentication credentials, the Skill adds the `token` and `openToken` values to a user model and stores that model in `data/smyx-common-claw.db`. SQLite provides no encryption at rest by default. The implementation does not apply field-level encryption, use an operating-system credential manager, explicitly restrict database file permissions, define a token retention period, or delete credentials after the analysis completes. Consequently, the credentials re ...[truncated 1542 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Avoid persistent token caching unless it is required. Keep tokens in process memory and discard them when execution ends. 2. If persistence is necessary, use an operating-system credential manager or a dedicated secrets-management service rather than SQLite plaintext columns. 3. Apply authenticated encryption to token fields, with encryption keys stored separately from the database. 4. Create the database and its parent directory with owner-only permissions, such as `0700` for the directory and `0600` for the file on POSIX systems. 5. Use short-lived, narrowly scoped tokens and refresh tokens through a separate protected mechanism. 6. Define and enforce token expiration, retention, deletion, and revocation procedures. 7. Do not include credentials in workspace backups unless those backups are encrypted and access-controlled. 8. Add tests that verify tokens are not recoverable as plaintext from the database file. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
skills/smyx_common/scripts/util.py:12
Finding
HTTP Debug Logging Can Expose Authentication Headers and Personal Data<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/util.py:12-22, 371-388`; `skills/smyx_common/scripts/config.py:148-149` **Vulnerability Type**: Sensitive information exposure through debug logging **Risk Level**: Medium ### Vulnerable Code The request utility enables low-level HTTP debugging: ```python if ConstantEnum.is_debug(): import http.client # Enable debugging mode http.client.HTTPConnection.debuglevel = 1 import logging logging.basicConfig() logging.getLogger().setLevel(logging.DEBUG) requests_log = logging.getLogger("urllib3") requests_log.setLevel(logging.DEBUG) requests_log.propagate = True ``` Its custom masking also reveals complete short values and prefixes of longer credentials: ```python safe_headers = {} for k, v in headers.items(): if v is None: safe_headers[k] = "None" elif isinstance(v, (dict, list)): safe_headers[k] = type(v).__name__ elif len(v) > 30: safe_headers[k] = v[:20] + "..." else: safe_headers[k] = v ConstantEnum.is_debug() and print( f"Request interception, URL:{url}", "method", method, "params", params, "data", data, "headers", safe_headers, "options", options, "timeout", timeout ) ``` Debug mode is automatically enabled on Windows: ```python @staticmethod def is_debug(): return platform.system() == 'Windows' or platform.system() != 'Linux' and ConstantEnum.IS_DEBUG ``` ### Technical Analysis `http.client.HTTPConnection.debuglevel = 1` can emit low-level request information independently of the Skill's custom `safe_headers` dictionary. Authenticated requests include the following sensitive headers: ```python headers.setdefault("X-Access-Token", ApiEnum.TOKEN) headers.setdefault("X-Api-Key", ApiEnum.API_SECRET_KEY) headers.setdefault("Authorization", ApiEnum.OPEN_TOKEN) ``` The custom logging does not fully redact these values. It prints short secrets in full and the ...[truncated 1676 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the platform-based automatic activation of debug mode. Require an explicit, temporary opt-in setting on every operating system. 2. Do not enable `HTTPConnection.debuglevel` or unrestricted `urllib3` debug logging for authenticated traffic. 3. Replace sensitive header values with a constant such as `[REDACTED]`; never retain prefixes or reveal short secrets. 4. Redact `Authorization`, `X-Access-Token`, `X-Api-Key`, cookies, OpenIDs, usernames, phone numbers, signed URLs, and personal data. 5. Log only operational metadata that is required for diagnostics, such as method, approved host, status code, elapsed time, and a non-sensitive request identifier. 6. Ensure exception logging cannot print raw request or response objects containing headers or bodies. 7. Add automated tests that inject marker secrets and verify that no marker or substring appears in logs. 8. Document secure log retention and restrict access to diagnostic output. ]]>

other

Note
Location
skills/smyx_common/scripts/util.py:294
Finding
Silent Remote Account Registration Uses the Supplied Identifier as Both OpenID and Mobile Number<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/util.py:294-307, 321-348` **Vulnerability Type**: Privacy-sensitive identifier transmission and automatic account provisioning **Risk Level**: Low ### Vulnerable Code ```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_json.get("success"): return _response_json and _response_json.get("result") except Exception as _e: CommonUtil.trace_exception_stack(_e) return {} ``` The operation occurs automatically when cached credentials are missing: ```python if not ApiEnum.TOKEN or not ApiEnum.OPEN_TOKEN: new_current_user = _get_or_create_user(current__user_name) if new_current_user: ApiEnum.TOKEN = new_current_user.get("token") ApiEnum.OPEN_TOKEN = new_current_user.get("openToken") ``` ### Technical Analysis The Skill documentation explains that an OpenID is needed to save and query reports, but the implementation goes further by invoking `/sys/phoneLogin` with both `silent: 1` and `register: 1`. This can create a remote account without a distinct confirmation step. The supplied value may be an OpenID, username, or phone number. Nevertheless, the code assigns the same value to both `openId` and `mobile` without validating whether it is a phone number. This creates unnecessary data duplication and may cause an arbitrary identifier to be processed or retained as mobile-number data. Network transmission to the analysis provider is necessary for the declared cloud-based functionality. Silent account cr ...[truncated 1344 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Obtain explicit user confirmation before creating a remote account. 2. Separate login from registration. Attempt authentication only when appropriate and invoke registration through a distinct, consented operation. 3. Clearly disclose the service operator, transmitted fields, purpose, retention policy, and account-deletion procedure. 4. Validate identifier types. Populate `mobile` only when the supplied value is a verified phone number. 5. Send only the minimum identity fields required by the remote API. 6. Avoid `silent: 1` for account-creation flows where informed consent is required. 7. Provide a mode for one-time analysis that does not create or persist an account when supported by the service. 8. Handle and document account deletion, token revocation, and removal of locally cached profile data. ]]>
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (60)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
If the skill auto-authenticates users, handles tokens, or includes billing flows while presenting itself as a pet-video analyzer, that is a serious undisclosed expansion of scope. Undeclared account creation/authentication and payment-related handling can expose personal data, create surprise actions on behalf of the user, and complicate consent and threat modeling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the skill auto-authenticates users, handles tokens, or includes billing flows while presenting itself as a pet-video analyzer, that is a serious undisclosed expansion of scope. Undeclared account creation/authentication and payment-related handling can expose personal data, create surprise actions on behalf of the user, and complicate consent and threat modeling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
If the skill auto-authenticates users, handles tokens, or includes billing flows while presenting itself as a pet-video analyzer, that is a serious undisclosed expansion of scope. Undeclared account creation/authentication and payment-related handling can expose personal data, create surprise actions on behalf of the user, and complicate consent and threat modeling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the skill auto-authenticates users, handles tokens, or includes billing flows while presenting itself as a pet-video analyzer, that is a serious undisclosed expansion of scope. Undeclared account creation/authentication and payment-related handling can expose personal data, create surprise actions on behalf of the user, and complicate consent and threat modeling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
If the skill auto-authenticates users, handles tokens, or includes billing flows while presenting itself as a pet-video analyzer, that is a serious undisclosed expansion of scope. Undeclared account creation/authentication and payment-related handling can expose personal data, create surprise actions on behalf of the user, and complicate consent and threat modeling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
If the skill auto-authenticates users, handles tokens, or includes billing flows while presenting itself as a pet-video analyzer, that is a serious undisclosed expansion of scope. Undeclared account creation/authentication and payment-related handling can expose personal data, create surprise actions on behalf of the user, and complicate consent and threat modeling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
If the skill auto-authenticates users, handles tokens, or includes billing flows while presenting itself as a pet-video analyzer, that is a serious undisclosed expansion of scope. Undeclared account creation/authentication and payment-related handling can expose personal data, create surprise actions on behalf of the user, and complicate consent and threat modeling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
If the skill auto-authenticates users, handles tokens, or includes billing flows while presenting itself as a pet-video analyzer, that is a serious undisclosed expansion of scope. Undeclared account creation/authentication and payment-related handling can expose personal data, create surprise actions on behalf of the user, and complicate consent and threat modeling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
If the skill auto-authenticates users, handles tokens, or includes billing flows while presenting itself as a pet-video analyzer, that is a serious undisclosed expansion of scope. Undeclared account creation/authentication and payment-related handling can expose personal data, create surprise actions on behalf of the user, and complicate consent and threat modeling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
If the skill auto-authenticates users, handles tokens, or includes billing flows while presenting itself as a pet-video analyzer, that is a serious undisclosed expansion of scope. Undeclared account creation/authentication and payment-related handling can expose personal data, create surprise actions on behalf of the user, and complicate consent and threat modeling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
If the skill auto-authenticates users, handles tokens, or includes billing flows while presenting itself as a pet-video analyzer, that is a serious undisclosed expansion of scope. Undeclared account creation/authentication and payment-related handling can expose personal data, create surprise actions on behalf of the user, and complicate consent and threat modeling.

Missing User Warnings

High
Confidence
98% confidence
Finding
The description omits a clear privacy warning that user-provided video URLs or uploaded files are sent to server-side APIs for analysis. Because pet-area videos may contain homes, people, schedules, or other sensitive context, undisclosed remote transmission creates significant privacy and data-handling risk.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The backend API behavior described in the reference file is inconsistent with the manifest: instead of analyzing pet play behavior, it appears to process videos for face analysis and health-style diagnosis. In a skill that invites users to upload local videos or submit URLs, this kind of capability mismatch is dangerous because it can mislead users about what content is being analyzed and exfiltrate or repurpose visual data for unintended processing.

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The documented API response is for human face detection and health/constitution diagnosis, which is materially unrelated to the declared pet-toy interaction analysis capability. This mismatch strongly suggests the skill may route user-provided pet videos or URLs to an undisclosed biometric/health-analysis backend, creating a deceptive data-use path and possible collection of sensitive personal data under false pretenses.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
This shared DAO defines persistent user-account storage, including username, email, token, and open_token fields, which is unrelated to the declared pet-toy video analysis function. In the context of a narrowly described analytics skill, undisclosed account/token handling materially expands the data-collection surface and creates risk of covert credential storage or secondary-use tracking.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The User model stores authentication-like secrets and identifiers such as token, open_token, email, and username despite the skill being framed as pet toy interaction analysis. This mismatch is dangerous because it enables silent retention of sensitive user data that could be stolen from the local database or reused outside the stated purpose.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The request helper contains unrelated identity logic that auto-registers or logs in a user against a health service whenever tokens are missing. For a pet-toy video analysis skill, silently creating or accessing external health-service accounts is a clear scope violation and can transmit personal identifiers without informed consent, potentially linking users to an unexpected backend and expanding the blast radius of compromise.

Lp3

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding
The skill declares powerful capabilities such as file access, environment/config reads, shell execution, and network access, but does not explicitly scope or constrain them via permissions metadata. In practice, this increases the risk that the agent can read local secrets, save user files, invoke scripts, and exfiltrate data without transparent user-facing limits.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger conditions are broad enough to auto-activate on ordinary phrases related to pets, play, or low activity without tight exclusion criteria. Overbroad triggering can cause the skill to activate unexpectedly, save files, read configs, or contact remote APIs when the user did not clearly intend to invoke this specific workflow.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The skill expands from one-time video analysis into mandatory historical report retrieval and persistence tied to a user open-id. This is dangerous because it introduces account-linked data retention and cloud record access beyond the core analysis function, increasing privacy and correlation risks if misused or compromised.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill states that uploaded attachments or video/image files are automatically saved locally, but does not surface that as a clear user warning in the top-level description. Silent local persistence increases the risk of retaining sensitive media longer than expected and exposing it to other local processes or users.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill instructs the agent to read configuration files to extract an api-key and reuse it as an open-id before proceeding. Reading local config-derived secrets for user identification is risky because it can leak credentials, conflate authentication and identity, and silently operate under unintended accounts.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The manifest describes a skill that analyzes pet-toy interaction videos and generates activity insights, which implies submitting videos for analysis and retrieving results. This file also provides add, edit, and delete operations on server-side records, including deletion by camera serial number, which goes beyond the stated analytics-focused behavior.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The delete method performs a deletion request using a camera identifier, but there is no confirmation prompt, logging/print statement, or explanatory comment/docstring warning the user about the destructive action. In this file, the operation is not accompanied by any visible disclosure despite being irreversible in intent.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The CLI requires an --open-id that may be a user ID, username, or phone number, and then stores it in process-wide state via ConstantEnumBase.CURRENT__OPEN_ID without any minimization, masking, privacy notice, or validation. In a pet wellness context, this identifier is linked to behavioral/health-adjacent analytics, increasing privacy risk if logs, crash output, or downstream components expose the value.

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