T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:159
- Finding
- Runtime Use of an Unpinned Remote OpenAPI Schema## Vulnerability Details **File Location**: `SKILL.md:159-162`; duplicated in `references/usage-patterns.md:5-9` **Vulnerability Type**: Unpinned remote dependency / mutable API schema **Risk Level**: Medium ### Vulnerable Code `SKILL.md:159-162`: ```text 1. Use the fixed link command by default: - `command -v feishu-openapi-cli` - If missing, create it: `uxc link feishu-openapi-cli https://open.feishu.cn/open-apis --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/feishu-openapi-skill/references/feishu-im.openapi.json` - `feishu-openapi-cli -h` ``` The same behavior is documented in `references/usage-patterns.md:5-9`: ```bash command -v feishu-openapi-cli uxc link feishu-openapi-cli https://open.feishu.cn/open-apis \ --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/feishu-openapi-skill/references/feishu-im.openapi.json feishu-openapi-cli -h ``` ### Technical Analysis The Skill directs users to load its OpenAPI schema from the mutable `main` branch of an external GitHub repository at runtime. No immutable commit reference, release version, checksum, or signature is used to ensure that the downloaded schema matches the version reviewed with this Skill. The project already contains a local audited copy at `references/feishu-im.openapi.json`, but the documented default workflow bypasses that copy. Consequently, the effective API operation definitions can change after the Skill package has been reviewed or installed. Although an OpenAPI schema is not directly executable code, it controls the operations exposed through UXC, including HTTP methods, paths, parameters, request bodies, and upload behavior. A malicious or accidentally altered schema could therefore cause later commands to construct requests that differ from the reviewed behavior. The destination base URL is explicitly set to the official Feishu endpoint, and authen ...[truncated 2106 chars]
- Remediation
- ## Remediation Suggestions 1. Use the bundled schema as the default: ```bash uxc link feishu-openapi-cli https://open.feishu.cn/open-apis \ --schema-url ./references/feishu-im.openapi.json ``` Resolve the path relative to the installed Skill directory rather than the caller’s current working directory. 2. If remote retrieval is operationally necessary, pin the URL to an immutable Git commit instead of `main`: ```text https://raw.githubusercontent.com/holon-run/uxc/<full-commit-hash>/skills/feishu-openapi-skill/references/feishu-im.openapi.json ``` 3. Publish an expected SHA-256 digest with the Skill and verify the downloaded schema before passing it to UXC. Abort setup if verification fails. 4. Cache the verified schema locally and require an explicit update action before replacing it. Do not silently refresh the schema during normal operation. 5. Extend `scripts/validate.sh` to reject schema URLs referencing mutable branches such as `main` or `master`, and to verify that documented operations match the bundled schema. 6. Preserve the existing host, HTTPS scheme, and `/open-apis` path restrictions. Use separate Feishu and Lark credentials and bindings where practical to prevent credentials intended for one service from being reused unexpectedly. 7. Require explicit user confirmation before message sends, replies, contact batch lookups, and file uploads, particularly after any schema update.
