T08 · Insecure Dependencies
- Location
SKILL.md:12- Finding
Unpinned npm Package Installed Globally
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 12–20 and 28–31
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
yaml metadata: author: pionex version: "0.1.0" homepage: "https://www.pionex.com" agent: requires: bins: ["pionex-trade-cli"] install: - id: npm kind: node package: "@pionex/pionex-ai-kit" bins: ["pionex-trade-cli", "pionex-ai-kit"] label: "Install pionex CLI (npm)"markdown 1. Install `pionex-trade-cli` CLI (from `@pionex/pionex-ai-kit`): ```bash npm install -g @pionex/pionex-ai-kittext ### Technical Analysis The skill instructs users or agents to install `@pionex/pionex-ai-kit` globally without specifying an exact package version or integrity digest. Consequently, installation resolves to whichever package release the npm registry serves at that time rather than to a fixed, audited artifact. An npm installation can execute package lifecycle scripts, including `preinstall`, `install`, and `postinstall`, with the privileges of the installing user. A global installation also places package-provided executables in a system-wide or user-wide binary location. The audited project contains neither the package source nor a lockfile or checksum that would allow the installed implementation to be verified from this repository. The audit found no evidence that the referenced package is currently malicious. The vulnerability is the unsafe and non-reproducible dependency installation mechanism, which creates a supply-chain attack opportunity if the package, maintainer account, registry resolution, or a future release is compromised. ### Attack Path 1. An attacker compromises the npm publisher account, package publication workflow, or another relevant supply-chain component. 2. The attacker publishes a malicious release of `@pionex/pionex-ai-kit`. 3. A user or agent follows `SKILL.md` and runs the unpinned global ...[truncated 1101 chars]- Remediation
View remediation
Remediation Suggestions
-
Pin the dependency to an exact reviewed version, for example:
bash npm install -g @pionex/pionex-ai-kit@X.Y.ZDo not use version ranges or implicit
latestresolution. -
Publish and verify the expected npm integrity digest and package provenance before installation.
-
Prefer a project-local installation with a committed lockfile over a global installation:
bash npm install --save-exact @pionex/pionex-ai-kit@X.Y.Z npx pionex-trade-cli market tickers --symbol BTC_USDT -
Review the selected release's source, dependency tree, bundled executables, and npm lifecycle scripts before approving it.
-
Where compatible with the package, disable lifecycle scripts during installation:
bash npm install --ignore-scripts --save-exact @pionex/pionex-ai-kit@X.Y.Z -
Run the CLI as an unprivileged user in a restricted environment with minimal filesystem and network access. Do not use
sudofor global installation. -
Add an update-review process so version and integrity changes require explicit security approval rather than silently tracking newly published releases.
-
