Back to skill

Security audit

Pet Treadmill Intensity & Heart Rate Analysis | 宠物跑步机运动强度与心率关联

Security checks for vulnerabilities and agentic risk

Overview

This skill is framed as pet treadmill analysis, but it sends videos and identifiers to a broad cloud analysis/account system with under-disclosed token storage and account behavior.

Review before installing. Use only if you are comfortable sending pet videos, report history identifiers, and possibly username/phone-style open-id values to the Life Emergence cloud services. Avoid placing real API secrets in fields this skill may treat as identity, and do not use it in a shared workspace unless token storage and retention are acceptable.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
skills/smyx_common/scripts/util.py:296
Finding
Silent Registration Discloses API Keys or User Identifiers as Phone and Identity Data<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/util.py:296-307, 322-342`; related identity instructions in `SKILL.md:49-56` **Vulnerability Type**: Credential and personal identifier disclosure through identity-field confusion **Risk Level**: High ### 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 {} ``` ```python current__user_name = ApiEnum.API_SECRET_KEY or ConstantEnum.CURRENT__USER_NAME or ConstantEnum.CURRENT__OPEN_ID found_user = None if (not ApiEnum.TOKEN or not ApiEnum.OPEN_TOKEN) and current__user_name: try: from .dao import UserDao, User user_dao = UserDao() 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") ``` ### Technical Analysis The request layer conflates three security domains: 1. An API secret used for service authentication. 2. A platform or application user identifier. 3. A telephone number submitted through the `mobile` field. `ApiEn ...[truncated 2090 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `ApiEnum.API_SECRET_KEY` from identity selection. Maintain separate, strongly typed fields for API credentials, open-id values, usernames, and phone numbers. 2. Never submit a credential in `openId`, `mobile`, username, or other identity fields. 3. Require explicit user consent before account registration. Replace silent registration with a documented authentication flow. 4. Send only the minimum identifier required by the service. Do not duplicate a value into both `openId` and `mobile`. 5. Validate phone numbers and open-id values according to separate schemas before transmission. 6. Clearly disclose the destination host, purpose, fields transmitted, retention policy, and account-creation behavior. 7. Add a bounded timeout and explicit TLS verification policy to the registration request. 8. Where possible, use a scoped, short-lived authorization token issued through the platform rather than collecting usernames or phone numbers. 9. Add tests proving that API keys can never reach identity or profile endpoints. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
skills/smyx_common/scripts/dao.py:58
Finding
Authentication Tokens Are Stored in Plaintext in a Shared Workspace SQLite Database<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/util.py:328-346`; storage implementation in `skills/smyx_common/scripts/dao.py:58-82, 331-333` **Vulnerability Type**: Plaintext storage of reusable authentication tokens **Risk Level**: Medium ### Vulnerable Code ```python 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 under the workspace data directory: ```python def get_db_path(self, db_path): import os cwd = os.getcwd() workspace = os.path.dirname(cwd) workspace = os.path.dirname(workspace) workspace = os.environ.get('OPENCLAW_WORKSPACE', workspace) parent_dir = os.path.join(workspace, "data") FileUtil.mkdir(parent_dir) db_path = os.path.join(parent_dir, db_path) return db_path ``` ```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 model stores both tokens as ordinary strings: ```python token = Column(String(500), comment="token") open_token = Column(String(1000), comment="开放token") source = Column(String(50), comment="token") ``` ### Technical Analysis The Skill copies the returned `token` and `openToken` into a local user model and persists them as ...[truncated 1762 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Avoid persistent token storage unless it is strictly required. Prefer short-lived in-memory tokens. 2. Store reusable credentials in the agent platform's credential manager or the operating system keyring. 3. If database persistence is unavoidable, encrypt each token with authenticated encryption using a key stored outside the database and workspace. 4. Create the database and parent directory with owner-only permissions, such as `0700` for the directory and `0600` for the file. 5. Use short-lived, least-privilege, audience-restricted tokens and implement automatic revocation and rotation. 6. Do not store refresh tokens unless necessary; protect them more strongly than ordinary access tokens. 7. Delete expired tokens and clear token fields after authentication failures or user logout. 8. Document local token storage and obtain user consent where required. 9. Add security tests that verify file permissions and ensure raw tokens do not appear in general workspace artifacts, logs, or backups. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
skills/smyx_common/scripts/util.py:318
Finding
Shared Request Utility Can Send Authentication Credentials to Arbitrary Absolute URLs<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/util.py:318-355, 388` **Vulnerability Type**: Credential forwarding without destination allowlisting **Risk Level**: Medium ### Vulnerable Code ```python headers = headers or {} if not url.startswith("https://") and not url.startswith("http://"): url = cls.BASE_URL + url headers['App-Id'] = ConstantEnum.APP__ID current__user_name = ApiEnum.API_SECRET_KEY or ConstantEnum.CURRENT__USER_NAME or ConstantEnum.CURRENT__OPEN_ID ``` ```python headers.setdefault("X-Access-Token", ApiEnum.TOKEN) headers.setdefault("X-Api-Key", ApiEnum.API_SECRET_KEY) headers.setdefault("Authorization", ApiEnum.OPEN_TOKEN) data = data or {} params = params or {} options = options or {} ConstantEnum.CURRENT__TENTANT_CODE and data.setdefault( 'tenantCode', ConstantEnum.CURRENT__TENTANT_CODE) ConstantEnum.DEFAULT__SKILL_HUB_NAME and data.setdefault( 'skillHubName', ConstantEnum.DEFAULT__SKILL_HUB_NAME) ConstantEnum.DEFAULT__SKILL_PLATFORM_NAME and data.setdefault( 'skillPlatform', ConstantEnum.DEFAULT__SKILL_PLATFORM_NAME) if current__user_name: data.setdefault('pnaUserName', current__user_name) ``` ```python response = requests.request( method, url, *args, json=data, params=params, headers=headers, timeout=int(timeout), **argss ) ``` ### Technical Analysis The utility accepts any URL beginning with `http://` or `https://`. Relative URLs are attached to the configured API base, but absolute URLs are trusted without checking their scheme security, hostname, port, or path. After accepting the destination, the utility automatically adds `X-Access-Token`, `X-Api-Key`, and `Authorization`. It can also insert the current username into the request body. As a result, any caller capable of passing an absolute URL can redirect these secrets to an untrusted host. No currently reviewed primary call site was confirmed to pass attacker-controlled absolute URLs to t ...[truncated 1584 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Reject absolute URLs in the shared authenticated request utility unless explicitly required. 2. Maintain an exact allowlist of approved HTTPS origins, including scheme, hostname, and port. 3. Attach credentials only after validating that the final parsed URL matches the intended authentication audience. 4. Reject all plaintext HTTP destinations when credentials or personal identifiers are present. 5. Use separate request clients for each service, each with independently scoped credentials and a fixed base URL. 6. Prevent redirects from forwarding authorization headers across origins. Disable redirects or validate every redirect target. 7. Normalize and parse URLs with a standard URL parser rather than relying on string-prefix checks. 8. Add tests for attacker-controlled hosts, deceptive subdomains, alternate ports, embedded credentials, redirects, and HTTP downgrade attempts. 9. Do not insert `pnaUserName` or other identifiers globally; add them only to endpoints that explicitly require them. ]]>

T08 · Insecure Dependencies

Note
Location
skills/smyx_common/requirements.txt:1
Finding
Inconsistent Dependency Declarations Create Supply-Chain and Reproducibility Risk<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/requirements.txt:1-3`; duplicated in `skills/smyx_analysis/requirements.txt:1-3`; conflicting documentation in `SKILL.md:38-42` **Vulnerability Type**: Incomplete and incorrectly named dependency declarations **Risk Level**: Low ### Vulnerable Configuration Both requirements files contain: ```text pydash==8.0.6 SQLAlchemy==2.0.46 yaml==6.0.3 ``` The Skill documentation separately instructs installation of: ```text requests>=2.28.0 ``` The source imports the following packages: ```python import requests import yaml ``` ### Technical Analysis The dependency metadata is inconsistent with the source and documentation: - `requests` is imported and used for all network operations but is absent from both requirements files. - The documentation specifies only a lower bound, `requests>=2.28.0`, allowing future releases to be installed without review. - The source imports the `yaml` module normally provided by the `PyYAML` distribution, while the manifests name `yaml`. Using an incorrect or ambiguous distribution name can cause installation failure or dependency-confusion exposure. - No hashes or unified lock file are provided. This finding does not establish that any listed package is malicious. The risk arises from ambiguous resolution and non-reproducible installation, which can cause an installer to obtain unintended, incompatible, or unreviewed code. ### Attack Path 1. An operator installs dependencies using one of the included requirements files or manually follows `SKILL.md`. 2. The package manager cannot obtain all imports from the manifest or resolves an ambiguous distribution name. 3. The operator adds packages manually, uses a different package index, or accepts an unreviewed release satisfying the broad lower bound. 4. A malicious, compromised, or incompatible package is installed into the Skill environment. 5. Because Python dependencies execute with the Skill's process pr ...[truncated 541 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `yaml` with the canonical reviewed distribution name `PyYAML`. 2. Add `requests` explicitly to each applicable dependency manifest. 3. Use exact, reviewed versions or compatible bounded ranges based on a documented update policy. 4. Generate a unified lock file containing cryptographic hashes for all direct and transitive dependencies. 5. Install from a trusted package index with dependency-confusion protections and prohibit untrusted extra indexes. 6. Use automated vulnerability and provenance scanning in the release pipeline. 7. Keep documentation synchronized with the authoritative lock file rather than maintaining separate installation instructions. 8. Test installation in a clean environment to verify that all imported modules originate from the intended distributions. ]]>
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 (64)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Network communication, token/open-token management, phone-based login, local persistence, billing/recharge handling, and generic utilities are all outside the reasonable expectations for a pet treadmill exercise-analysis skill. In context, this broad hidden scope is dangerous because it crosses into authentication, account lifecycle, and monetization workflows while collecting user identifiers and uploaded media.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Network communication, token/open-token management, phone-based login, local persistence, billing/recharge handling, and generic utilities are all outside the reasonable expectations for a pet treadmill exercise-analysis skill. In context, this broad hidden scope is dangerous because it crosses into authentication, account lifecycle, and monetization workflows while collecting user identifiers and uploaded media.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Network communication, token/open-token management, phone-based login, local persistence, billing/recharge handling, and generic utilities are all outside the reasonable expectations for a pet treadmill exercise-analysis skill. In context, this broad hidden scope is dangerous because it crosses into authentication, account lifecycle, and monetization workflows while collecting user identifiers and uploaded media.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Network communication, token/open-token management, phone-based login, local persistence, billing/recharge handling, and generic utilities are all outside the reasonable expectations for a pet treadmill exercise-analysis skill. In context, this broad hidden scope is dangerous because it crosses into authentication, account lifecycle, and monetization workflows while collecting user identifiers and uploaded media.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Network communication, token/open-token management, phone-based login, local persistence, billing/recharge handling, and generic utilities are all outside the reasonable expectations for a pet treadmill exercise-analysis skill. In context, this broad hidden scope is dangerous because it crosses into authentication, account lifecycle, and monetization workflows while collecting user identifiers and uploaded media.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Network communication, token/open-token management, phone-based login, local persistence, billing/recharge handling, and generic utilities are all outside the reasonable expectations for a pet treadmill exercise-analysis skill. In context, this broad hidden scope is dangerous because it crosses into authentication, account lifecycle, and monetization workflows while collecting user identifiers and uploaded media.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Network communication, token/open-token management, phone-based login, local persistence, billing/recharge handling, and generic utilities are all outside the reasonable expectations for a pet treadmill exercise-analysis skill. In context, this broad hidden scope is dangerous because it crosses into authentication, account lifecycle, and monetization workflows while collecting user identifiers and uploaded media.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Network communication, token/open-token management, phone-based login, local persistence, billing/recharge handling, and generic utilities are all outside the reasonable expectations for a pet treadmill exercise-analysis skill. In context, this broad hidden scope is dangerous because it crosses into authentication, account lifecycle, and monetization workflows while collecting user identifiers and uploaded media.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Network communication, token/open-token management, phone-based login, local persistence, billing/recharge handling, and generic utilities are all outside the reasonable expectations for a pet treadmill exercise-analysis skill. In context, this broad hidden scope is dangerous because it crosses into authentication, account lifecycle, and monetization workflows while collecting user identifiers and uploaded media.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Network communication, token/open-token management, phone-based login, local persistence, billing/recharge handling, and generic utilities are all outside the reasonable expectations for a pet treadmill exercise-analysis skill. In context, this broad hidden scope is dangerous because it crosses into authentication, account lifecycle, and monetization workflows while collecting user identifiers and uploaded media.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Network communication, token/open-token management, phone-based login, local persistence, billing/recharge handling, and generic utilities are all outside the reasonable expectations for a pet treadmill exercise-analysis skill. In context, this broad hidden scope is dangerous because it crosses into authentication, account lifecycle, and monetization workflows while collecting user identifiers and uploaded media.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Network communication, token/open-token management, phone-based login, local persistence, billing/recharge handling, and generic utilities are all outside the reasonable expectations for a pet treadmill exercise-analysis skill. In context, this broad hidden scope is dangerous because it crosses into authentication, account lifecycle, and monetization workflows while collecting user identifiers and uploaded media.

Missing User Warnings

High
Confidence
98% confidence
Finding
The skill does not clearly warn users that videos, optional heart-rate data, and an identifier may be transmitted to cloud APIs for processing and history retrieval. In this context, the data is sensitive and potentially account-linked, so undisclosed external transmission substantially increases privacy and compliance risk.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
Across the endpoint, request, and response descriptions, the referenced API appears to perform generic or human-health-oriented video analysis rather than pet exercise intensity assessment. In a skill that claims real-time pet rehabilitation and exercise guidance, this is dangerous because users may rely on outputs that are irrelevant, incorrect, or derived from an unintended analysis pipeline while sensitive video data is still transmitted off-device.

Intent-Code Divergence

High
Confidence
99% confidence
Finding
The documented response schema describes human face detection and constitution/organ diagnosis, which is fundamentally unrelated to the advertised pet treadmill intensity analysis use case. This mismatch strongly suggests the skill may send user-provided pet videos to an unrelated or repurposed backend, creating a serious integrity and privacy risk because consumers are misled about what data processing actually occurs.

Description-Behavior Mismatch

High
Confidence
95% confidence
Finding
The file implements generic user-account persistence unrelated to the stated pet treadmill intensity-analysis purpose, which is a strong scope mismatch. Unnecessary account-management code expands the attack surface, introduces storage of personal data, and may conceal capabilities not expected by users or reviewers.

Context-Inappropriate Capability

High
Confidence
96% confidence
Finding
The model stores authentication-style token and profile fields despite no clear need in a pet exercise analysis skill. Persisting tokens in a local SQLite database increases the risk of credential theft, account compromise, and privacy violations if the database file is exposed or improperly shared.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
This utility silently performs external account creation/login, retrieves tokens, and persists them locally as part of generic request handling, even though that behavior is unrelated to pet treadmill intensity analysis. In the context of this skill, the code expands data access and identity scope far beyond what is needed, creating risk of unauthorized account provisioning, token misuse, and covert linkage of user identity to an unrelated backend service.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill declares no explicit tool scope even though its instructions require shell execution, filesystem access, environment/config reading, network/API access, and local file writes. That creates an over-privileged and weakly bounded execution model where an agent may invoke sensitive capabilities without clear least-privilege constraints or user-visible authorization boundaries.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The broad default trigger can cause the skill to activate automatically for any uploaded pet treadmill video that appears analysis-related. Overbroad activation is dangerous because it may initiate file handling, identifier collection, or cloud submission without sufficiently specific user intent or consent.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
Automatic history-report listing and cloud query behavior exceed the core analysis function and can expose prior records and report links tied to a user identifier. In a health-adjacent context involving videos and optional heart-rate data, expanding into record retrieval materially raises confidentiality concerns.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
Automatically saving uploaded files without a clear user-facing warning creates an avoidable privacy and retention risk. Users may believe uploads are used transiently for analysis, not persisted on disk where they may remain accessible after the session.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill explicitly instructs the agent to obtain an `open-id` from local config files or from the user before proceeding, expanding behavior into account/record access. Reading identifiers from local configuration is sensitive because it can exfiltrate or repurpose credentials/user IDs without clear user awareness, and linking analysis to cloud history increases privacy risk.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
Requesting a username or phone number as `open-id` without a clear privacy warning or minimization rationale unnecessarily exposes personal identifiers. This is especially sensitive when combined with cloud-stored historical reports and uploaded video/biometric-adjacent data.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest describes a skill for analyzing pet treadmill exercise intensity from video and optional heart-rate data. However, this service also implements add, edit, and delete operations for camera/device records, which are administrative data-management capabilities not described as part of the analysis function.

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