T08 · Insecure Dependencies
- Location
SKILL.md:26- Finding
Unpinned Global npm Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 26-29
Vulnerability Type:T08: Insecure Dependencies
Risk Level: HighVulnerable Code
bash npm install -g @okx_ai/okx-trade-cli okx config init # select site -> follow browser OAuth flowTechnical Analysis
The documented installation command retrieves the latest available version of
@okx_ai/okx-trade-cli, despite the Skill frontmatter identifying version1.3.7as the expected dependency. Consequently, the package installed by users may differ from the version associated with the reviewed Skill.A global npm installation can execute package lifecycle scripts with the permissions of the invoking user. Because the dependency's implementation is not included in this project, its behavior cannot be verified as part of this audit. An unpinned dependency can change after review due to a legitimate incompatible release, package-account compromise, registry compromise, or malicious publication.
Attack Path
- An attacker compromises the npm package, its publisher account, or its distribution process.
- The attacker publishes a malicious release under the legitimate package name.
- A user follows the documented
npm install -g @okx_ai/okx-trade-cliinstruction. - npm resolves and installs the attacker-controlled latest release rather than the reviewed
1.3.7release. - Malicious package code or lifecycle scripts execute under the user's local account.
- The malicious package can access files available to that account, including OKX configuration or authentication state, and can tamper with subsequent trading operations.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileges of the user performing the installation. The affected scope may include local files, environment variables, npm configuration, OKX API profiles, OAuth state, and trading operations available through tho ...[truncated 125 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin the installation command to the version declared in the Skill metadata:
bash npm install -g @okx_ai/okx-trade-cli@1.3.7 -
Keep the dependency version in the installation instructions synchronized with
metadata.version. -
Verify package provenance and registry signatures where supported.
-
Use a lockfile or an equivalent integrity-pinning mechanism when packaging the dependency locally.
-
Review package lifecycle scripts before installation and consider installing with scripts disabled when operationally possible.
-
Avoid elevated installation privileges and execute the CLI under a dedicated, least-privileged account.
-
Establish a controlled update process in which each new CLI version is reviewed before the documented version is changed.
-
