Back to skill

Security audit

KuCoin OpenAPI Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed, public KuCoin market-data helper with one supply-chain caveat around its remote schema URL.

Before installing, prefer using the bundled reviewed OpenAPI schema or a pinned commit URL if your workflow depends on strict integrity. Do not add KuCoin private credentials to this v1 skill; it is intended only for public market-data reads.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:37
Finding

Mutable Remote OpenAPI Schema Creates a Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:14, SKILL.md:37-41, references/usage-patterns.md:5-8
Vulnerability Type: Unpinned remote dependency
Risk Level: Medium

The skill instructs users to retrieve an OpenAPI schema from the mutable main branch of an external GitHub repository.

markdown
- Access to the curated OpenAPI schema URL:
  - `https://raw.githubusercontent.com/holon-run/uxc/main/skills/kucoin-openapi-skill/references/kucoin-public.openapi.json`
markdown
1. Use the fixed link command by default:
   - `command -v kucoin-openapi-cli`
   - If missing, create it:
     `uxc link kucoin-openapi-cli https://api.kucoin.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/kucoin-openapi-skill/references/kucoin-public.openapi.json`
   - `kucoin-openapi-cli -h`

The same unsafe dependency pattern appears in the usage reference:

bash
command -v kucoin-openapi-cli
uxc link kucoin-openapi-cli https://api.kucoin.com \
  --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/kucoin-openapi-skill/references/kucoin-public.openapi.json
kucoin-openapi-cli -h

Technical Analysis

The URL references the mutable main branch rather than an immutable commit. No digest, signature, or other integrity check is specified. Consequently, the schema used at runtime can differ from the bundled and audited references/kucoin-public.openapi.json.

If the upstream repository or its publishing workflow is compromised, an attacker can modify the remote schema after this skill has passed review. When uxc link subsequently retrieves that schema, the generated CLI can expose API operations that were not included in the reviewed package. This undermines the stated guarantee that the skill is restricted to four curated public, read-only endpoints.

The remote resource is an API description rather than an executable script, so direct arbitrary l ...[truncated 1521 chars]

Remediation
View remediation

Remediation Suggestions

  1. Prefer the bundled, reviewable references/kucoin-public.openapi.json instead of downloading a schema at runtime.
  2. If remote retrieval is required, replace main with a full immutable Git commit identifier.
  3. Record an expected SHA-256 digest and verify the downloaded schema before passing it to uxc.
  4. Fail closed when integrity verification fails; do not silently fall back to the mutable remote resource.
  5. Extend scripts/validate.sh to reject schema URLs containing mutable branch references such as /main/ or /master/.
  6. Validate that the effective schema contains only the four intended GET operations and no security schemes, private endpoints, alternate servers, or state-changing methods.
  7. Keep the documentation, usage examples, and validation logic synchronized so all setup paths enforce the same pinned and integrity-checked schema.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep