T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:11
- Finding
- Unauditable Globally Installed Third-Party CLI Dependency## Vulnerability Details **File Location**: `SKILL.md:11-17` **Vulnerability Type**: Supply-chain exposure through a globally installed npm dependency **Risk Level**: Medium ### Vulnerable Code Snippet ```yaml metadata: author: okx version: "1.4.7" homepage: "https://www.okx.com" agent: requires: bins: ["okx"] install: - id: npm kind: node package: "@okx_ai/okx-trade-cli@1.4.7" bins: ["okx"] label: "Install okx CLI (npm)" ``` The installation instruction is also presented to users in `SKILL.md:25-31`: ```bash npm install -g @okx_ai/okx-trade-cli ``` ### Technical Analysis The Skill depends on `@okx_ai/okx-trade-cli@1.4.7`, which is installed globally from the npm registry. Pinning the version reduces unintentional version drift, and the package namespace is consistent with the declared vendor. However, the reviewed artifact does not contain the package source, a lockfile, a cryptographic integrity value, or other verifiable provenance information. npm packages may execute lifecycle scripts during installation. A global installation therefore allows the dependency's installation logic to run with the privileges of the user executing npm and to place commands in globally accessible binary locations. The audit cannot verify the CLI's installation-time behavior, runtime network destinations, or credential handling because its implementation is absent from the artifact. This is a supply-chain risk rather than evidence that the named package is currently malicious. ### Attack Path 1. An attacker compromises the npm package, its publisher account, the registry delivery path, or the package release process. 2. A user or agent follows the Skill's installation instructions. 3. npm downloads the externally maintained package and may execute its lifecycle scripts. 4. The compromised code runs with the installing user's privileges. 5. It can ...[truncated 713 chars]
- Remediation
- ## Remediation Suggestions 1. Include auditable CLI source or provide a reproducible, independently verifiable build. 2. Publish and verify package provenance, signatures, and a cryptographic integrity digest before installation. 3. Use a lockfile or equivalent immutable dependency manifest. 4. Avoid global installation. Install the CLI in an isolated project directory, container, or restricted execution environment. 5. Disable npm lifecycle scripts where compatible, such as with `--ignore-scripts`, and separately review any scripts required for operation. 6. Execute the CLI as a dedicated, least-privileged user with restricted filesystem and network access. 7. Validate the installed binary's path and checksum before invoking it. 8. Document the expected network endpoints and credential-access behavior so deployments can enforce an allowlist.
