Back to skill

Security audit

中医面诊分析工具

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches a remote facial-health analysis purpose, but it handles sensitive video, identity, credentials, logs, and persistent tokens in ways users should review before installing.

Install only after reviewing the remote data flow. Use a dedicated pseudonymous open-id rather than a phone number or secret, assume videos and report history go to the configured remote service, and avoid running this in a shared workspace until credential logging, plaintext token storage, automatic registration, and dependency scope are fixed.

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:282
Finding
Credential and User Identifier Repurposed for Remote Account Registration<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/util.py:282-297, 312-338`; related instructions in `SKILL.md:59-70` **Vulnerability Type**: Sensitive information disclosure, identity confusion, and registration without explicit consent **Risk Level**: High ### Code Snippet ```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 } 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") ``` ```python if current__user_name: data.setdefault('pnaUserName', current__user_name) ``` ### Technical Analysis The Skill instructions direct the Agent to use a configured API key as an `open-id`. The common request layer then selects `API_SECRET_KEY` before the usernam ...[truncated 1953 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `ApiEnum.API_SECRET_KEY` from all user-identity selection logic. 2. Define separate, strongly typed configuration fields for authentication credentials and user identifiers. 3. Never send an API key or secret as `openId`, `mobile`, `username`, or `pnaUserName`. 4. Disable automatic registration by default. 5. Require explicit, informed user consent before creating a remote account. 6. Use a dedicated pseudonymous identifier when report persistence is required. 7. Validate identity inputs and reject values that match credential formats. 8. Clearly document all recipients, purposes, retention periods, and deletion procedures for biometric and health data. 9. Add tests proving that secrets cannot reach identity fields or registration endpoints. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
skills/smyx_common/scripts/util.py:342
Finding
Authentication Tokens and Sensitive Request Data Exposed Through Unconditional Logging<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/util.py:342-365, 389-424` **Vulnerability Type**: Sensitive information exposure through logs **Risk Level**: High ### Code Snippet ```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) if bool(options.get("dataAsParams")): params.update(data) print( f"Request intercepted, URL:{url}", "method", method, "params", params, "data", data, "headers", headers, "options", options, "timeout", timeout ) response = requests.request( method, url, *args, json=data, params=params, headers=headers, timeout=int(timeout), **argss ) ``` The source uses an equivalent non-English status label in the `print` call. The security-relevant behavior is the unconditional output of `headers`, `params`, and `data`. ### Technical Analysis The code inserts access tokens, an API key, and an authorization token into the headers object. It then prints the entire headers object before every request without checking whether debug logging is enabled. The same output includes request parameters and bodies. These structures can contain `pnaUserName`, tenant information, report identifiers, video URLs, and health-analysis metadata. Success and error handling also print request headers and related response content. Agent output, p ...[truncated 1282 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove unconditional request and response logging. 2. Use structured logging with an explicit allowlist of non-sensitive fields. 3. Always redact: - `Authorization` - `X-Access-Token` - `X-Api-Key` - Cookies and session identifiers - Usernames, phone numbers, and open identifiers - Video URLs and report identifiers - Biometric and health-analysis content 4. Keep detailed HTTP diagnostics disabled by default. 5. Ensure production logging never serializes complete request or response objects. 6. Apply centralized redaction before data reaches any logger. 7. Restrict log access and configure short retention periods. 8. Rotate any credentials or tokens that may already have appeared in logs. 9. Add automated tests that fail when sensitive header names or values appear in captured output. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
skills/smyx_common/scripts/dao.py:56
Finding
Authentication Tokens and User Profile Data Stored in Plaintext SQLite Database<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/dao.py:56-74, 287-314`; token persistence is initiated from `skills/smyx_common/scripts/util.py:317-337` **Vulnerability Type**: Plaintext storage of sensitive authentication data **Risk Level**: Medium ### Code Snippet ```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) ``` ```python class User(Base, BaseModelMixin): __tablename__ = "sys_user" id = Column(String(32), primary_key=True, index=True) source_id = Column(String(32)) username = Column(String(100), unique=True, index=True, nullable=False) email = Column(String(45), unique=True, index=True) birthday = Column(DateTime, unique=True, index=True) sex = Column(Integer) age = Column(Integer) token = Column(String(500)) open_token = Column(String(1000)) source = Column(String(50)) del_flag = Column(Integer, default=0) create_time = Column(DateTime, default=func.now()) update_time = Column(DateTime, default=func.now(), onupdate=func.now()) ``` ```python 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) ``` ### Technical Analysis The Skill stores remote access tokens and user profile attributes directly in a predictable SQLite database at `${OPENCLAW_WORKSPACE}/data/smyx-common-claw.db`. No application-level encryption is applied to `tok ...[truncated 1499 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Store tokens in the platform secret store or an operating-system credential manager. 2. Avoid persisting tokens when a short-lived in-memory session is sufficient. 3. If local persistence is unavoidable: - Encrypt tokens using a key not stored beside the database. - Create the directory and database with owner-only permissions. - Separate records by user and Skill security boundary. 4. Store only the minimum profile fields required for the declared function. 5. Implement token expiration, revocation, rotation, and secure deletion. 6. Add an explicit user-facing option to delete cached credentials and profile information. 7. Prevent workspace backups and diagnostic bundles from including credential databases. 8. Audit existing databases and revoke any tokens exposed through overly broad filesystem permissions. ]]>

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding
Excessive and Inconsistent Runtime Dependency Set<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1-3`; `skills/smyx_common/requirements.txt:1-127`; documented requirement in `SKILL.md:47-51` **Vulnerability Type**: Excessive supply-chain exposure and inconsistent package declaration **Risk Level**: Medium ### Code Snippet ```text pydash==8.0.6 SQLAlchemy==2.0.46 yaml==6.0.3 ``` The bundled common dependency list additionally includes packages unrelated to the declared facial-analysis runtime, including: ```text APScheduler==3.11.2 dbus-python==1.2.18 GitPython==3.1.45 langchain==1.0.3 openai==2.16.0 psutil==7.1.3 psycopg2-binary==2.9.11 pyinstaller==6.18.0 supervisor==4.2.1 unattended-upgrades==0.1 watchdog==6.0.0 ``` The common list also separately declares the expected YAML implementation: ```text PyYAML==6.0.3 ``` ### Technical Analysis The Skill documentation states that the scripts require `requests`, but the root dependency file omits `requests` and instead declares `yaml==6.0.3`. The code imports the `yaml` module normally provided by `PyYAML`, while the bundled common requirements separately include `PyYAML==6.0.3`. The common dependency file contains 127 pinned packages, including system integration, service supervision, database clients, AI frameworks, build tools, and filesystem monitoring components that are not required by the audited facial-analysis path. No malicious dependency payload was confirmed in the repository. Nevertheless, the inconsistent YAML package naming and broad environment-style dependency freeze increase the risk of incorrect package resolution, dependency confusion, installation failure, vulnerable transitive components, and execution of unnecessary installation hooks. ### Attack Path 1. An installer processes the root or bundled requirements file. 2. It resolves the ambiguously or incorrectly named YAML package and downloads numerous unrelated packages. 3. Package build or installation hooks execute with the installer's permissions. 4. A c ...[truncated 683 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `yaml==6.0.3` with the intended and reviewed `PyYAML` package. 2. Maintain one authoritative runtime dependency file. 3. Reduce runtime dependencies to packages directly required by the executed code. 4. Move test, build, packaging, database, supervisor, AI framework, and system-integration packages into separate development profiles where genuinely needed. 5. Generate a reviewed lock file with cryptographic hashes. 6. Use a private or allowlisted package index for production installation. 7. Run dependency vulnerability and license scanning in CI. 8. Test installation in an isolated environment to ensure the declared requirements exactly match imports. 9. Avoid installing the 127-package common environment snapshot as part of this Skill. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (80)

Known Vulnerable Dependency: Authlib==1.6.6 — 14 advisory(ies): CVE-2026-28490 (Authlib Vulnerable to JWE RSA1_5 Bleichenbacher Padding Oracle); CVE-2026-28802 (Authlib: Setting `alg: none` and a blank signature appears to bypass signature v); CVE-2026-41425 (Authlib: Cross-site request forging when using cache) +11 more

Critical
Category
Supply Chain
Confidence
98% confidence
Finding
Authlib is pinned to a version flagged with numerous critical advisories affecting token/JWE/JWT handling, including signature validation bypass and padding-oracle style issues. In a skill that uploads videos or fetches network URLs and calls server-side APIs, compromised auth or token validation can enable account/session abuse, request forgery, or unauthorized access to protected backend functionality.

Known Vulnerable Dependency: GitPython==3.1.45 — 16 advisory(ies): CVE-2026-78676 (GitPython: Dormant multi-line git-config values are corrupted into live injected); CVE-2026-67325 (GitPython: Command Injection via git long-option prefix abbreviation bypass of C); CVE-2026-73620 (GitPython: Unguarded git option forwarding in IndexFile.checkout() and TagRefere) +13 more

Critical
Category
Supply Chain
Confidence
97% confidence
Finding
GitPython is pinned to a version with multiple critical advisories including command injection and unsafe option forwarding. If the skill or its surrounding agent ecosystem ever processes repositories, refs, tags, or git config values from untrusted input, this can lead to arbitrary command execution on the host.

Known Vulnerable Dependency: langchain-core==1.0.2 — 12 advisory(ies): CVE-2026-26013 (LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_to); CVE-2025-65106 (LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templa); CVE-2026-40087 (LangChain has incomplete f-string validation in prompt templates) +9 more

Critical
Category
Supply Chain
Confidence
97% confidence
Finding
langchain-core has multiple critical advisories including SSRF and prompt/template injection classes. This is highly relevant because the skill explicitly accepts network video URLs; vulnerable framework components can turn crafted inputs into server-side requests to internal resources or unsafe template execution paths.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
The skill explicitly supports retrieving historical reports, using a persistent user identifier, and saving results to local files, but the description omits those behaviors. Hidden persistence and identity-linked history increase privacy and data-governance risk, especially for health-related outputs.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill explicitly supports retrieving historical reports, using a persistent user identifier, and saving results to local files, but the description omits those behaviors. Hidden persistence and identity-linked history increase privacy and data-governance risk, especially for health-related outputs.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill explicitly supports retrieving historical reports, using a persistent user identifier, and saving results to local files, but the description omits those behaviors. Hidden persistence and identity-linked history increase privacy and data-governance risk, especially for health-related outputs.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill explicitly supports retrieving historical reports, using a persistent user identifier, and saving results to local files, but the description omits those behaviors. Hidden persistence and identity-linked history increase privacy and data-governance risk, especially for health-related outputs.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill explicitly supports retrieving historical reports, using a persistent user identifier, and saving results to local files, but the description omits those behaviors. Hidden persistence and identity-linked history increase privacy and data-governance risk, especially for health-related outputs.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The skill explicitly supports retrieving historical reports, using a persistent user identifier, and saving results to local files, but the description omits those behaviors. Hidden persistence and identity-linked history increase privacy and data-governance risk, especially for health-related outputs.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The skill explicitly supports retrieving historical reports, using a persistent user identifier, and saving results to local files, but the description omits those behaviors. Hidden persistence and identity-linked history increase privacy and data-governance risk, especially for health-related outputs.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The skill explicitly supports retrieving historical reports, using a persistent user identifier, and saving results to local files, but the description omits those behaviors. Hidden persistence and identity-linked history increase privacy and data-governance risk, especially for health-related outputs.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The skill explicitly supports retrieving historical reports, using a persistent user identifier, and saving results to local files, but the description omits those behaviors. Hidden persistence and identity-linked history increase privacy and data-governance risk, especially for health-related outputs.

Vague Triggers

High
Confidence
96% confidence
Finding
The skill auto-triggers for nearly any user-provided video unless a few excluded topics are mentioned, which is overly broad for a workflow that can upload user media, read config, and invoke local scripts. Broad trigger rules can cause unintended execution on unrelated content and expand the chance of privacy-impacting or user-surprising actions.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
A delete operation for records identified by cameraSn is not justified by a user-facing skill whose stated purpose is submitting videos for facial diagnosis and returning results. If exposed through the agent, this could allow destructive actions against backend assets or records unrelated to diagnosis, creating integrity and availability risk.

Missing User Warnings

High
Confidence
98% confidence
Finding
The skill reads the entire local file and uploads its contents to a remote API without any user-facing disclosure in this file. Since facial videos are highly sensitive biometric/health-related data, silent exfiltration to a remote service raises significant privacy and compliance risks, especially if users believe processing is local or do not understand retention/sharing implications.

Known Vulnerable Dependency: click==8.3.1 — 1 advisory(ies): CVE-2026-7246 (Pallets Click, versions 8.3.2 and below, contain a command injection vulnerabili)

High
Category
Supply Chain
Confidence
80% confidence
Finding
Click is pinned to a version with a reported command-injection advisory. If this dependency is used by administrative tooling, build scripts, wrappers, or any user-influenced CLI invocation around the skill, an attacker may be able to inject shell arguments or commands.

Known Vulnerable Dependency: cryptography==3.4.8 — 16 advisory(ies): CVE-2023-50782 (Python Cryptography package vulnerable to Bleichenbacher timing oracle attack); GHSA-537c-gmf6-5ccf (Vulnerable OpenSSL included in cryptography wheels); GHSA-5cpq-8wj7-hf2v (Vulnerable OpenSSL included in cryptography wheels) +13 more

High
Category
Supply Chain
Confidence
96% confidence
Finding
cryptography==3.4.8 is very old and carries multiple high-severity advisories, including timing-oracle and bundled OpenSSL issues. Because this skill interacts with remote URLs and server-side APIs, weak cryptographic primitives or vulnerable TLS/JWT-related operations materially increase risk of confidentiality and integrity compromise.

Known Vulnerable Dependency: httplib2==0.20.2 — 2 advisory(ies): CVE-2026-59939 (httplib2: Decompression Bomb Denial of Service via Unbounded gzip/deflate Respon); CVE-2026-59939 (httplib2 is a comprehensive HTTP client library for Python. Prior to 0.32.0, htt)

High
Category
Supply Chain
Confidence
90% confidence
Finding
httplib2 is flagged for decompression-bomb denial of service via unbounded compressed responses. This is especially relevant here because the skill supports network video URLs, meaning attacker-controlled endpoints could return malicious compressed content and exhaust memory or CPU on the server.

Known Vulnerable Dependency: idna==3.11 — 2 advisory(ies): CVE-2026-45409 (Internationalized Domain Names in Applications (IDNA): Specially crafted inputs ); CVE-2026-45409 (Internationalized Domain Names in Applications (IDNA) for Python provides suppor)

High
Category
Supply Chain
Confidence
80% confidence
Finding
idna is pinned to a version with advisories related to specially crafted internationalized domain inputs. In a skill that accepts network video URLs, improper IDNA handling can enable hostname confusion, filter bypass, or incorrect allow/blocklist decisions when validating remote sources.

Known Vulnerable Dependency: langchain-openai==1.0.1 — 2 advisory(ies): GHSA-r7w7-9xr2-qq2r; PYSEC-2026-76

High
Category
Supply Chain
Confidence
85% confidence
Finding
langchain-openai is listed with high-severity advisories and operates at a trust boundary between user input, prompts, and model/tool interactions. If exploited, weaknesses here may enable data exposure, unsafe tool behavior, or bypasses in request handling that affect the server-side API workflow.

Known Vulnerable Dependency: langgraph==1.0.2 — 2 advisory(ies): GHSA-g48c-2wqr-h844; PYSEC-2026-83

High
Category
Supply Chain
Confidence
84% confidence
Finding
langgraph is pinned to a version with published advisories affecting the agent workflow layer. In an LLM-driven skill, vulnerabilities in orchestration and state-management libraries can permit unintended execution paths, data leakage between runs, or abuse of tool invocation logic.

Known Vulnerable Dependency: langgraph-checkpoint==3.0.0 — 4 advisory(ies): GHSA-fjqc-hq36-qh5p; GHSA-mhr3-j7m5-c7c9; PYSEC-2026-2573 +1 more

High
Category
Supply Chain
Confidence
84% confidence
Finding
langgraph-checkpoint is affected by multiple advisories and may expose risks in persisted execution state or recovery logic. If attacker-controlled data is checkpointed and later rehydrated unsafely, this can lead to data leakage, integrity issues, or abuse of resumed workflows.

Known Vulnerable Dependency: langgraph-sdk==0.2.9 — 2 advisory(ies): GHSA-w39p-vh2g-g8g5; PYSEC-2026-2575

High
Category
Supply Chain
Confidence
82% confidence
Finding
langgraph-sdk is flagged with high-severity advisories and may affect remote graph/API interactions. Because this skill communicates with server-side services, weaknesses in the SDK can expose request/response data, enable unauthorized operations, or weaken boundary checks between components.

Known Vulnerable Dependency: langsmith==0.4.39 — 7 advisory(ies): GHSA-3644-q5cj-c5c7; GHSA-f4xh-w4cj-qxq8; GHSA-rr7j-v2q5-chgv +4 more

High
Category
Supply Chain
Confidence
88% confidence
Finding
langsmith is pinned to a version with several high-severity advisories. Observability/tracing platforms often handle prompts, outputs, metadata, and sometimes secrets, so vulnerabilities here can amplify exposure of sensitive user video metadata, diagnosis results, or credentials.

Known Vulnerable Dependency: oauthlib==3.2.0 — 2 advisory(ies): GHSA-3pgj-pg6c-r5p7; PYSEC-2022-269

High
Category
Supply Chain
Confidence
95% confidence
Finding
oauthlib==3.2.0 has known security advisories affecting OAuth flows. Since this skill calls server-side APIs and may rely on bearer tokens or delegated access, weaknesses in OAuth processing can result in token leakage, improper validation, or authorization bypass.

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