T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Unpinned Executable npm Dependency
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 14–19
Vulnerability Type: Unpinned third-party executable dependency
Risk Level: MediumComplete Code Snippet:
yaml agent: requires: bins: ["pionex-trade-cli"] install: - id: npm kind: node package: "@pionex/pionex-ai-kit" bins: ["pionex-trade-cli", "pionex-ai-kit"]Technical Analysis
The Skill installs and executes
@pionex/pionex-ai-kitwithout pinning an exact package version or verifying an integrity hash. Consequently, the code installed at deployment time may differ from the version reviewed when the Skill was published.The dependency implementation is not included in the audited project. Its credential handling, transaction construction, network destinations, and logging behavior therefore cannot be verified from the available source. Because the CLI is intended to operate with Pionex API credentials and bot-trading permissions, a compromised or unexpectedly modified package version would execute in a security-sensitive context.
The package installation is necessary to provide the Skill's declared trading functionality, but accepting an unrestricted version is not necessary and weakens supply-chain security.
Attack Path
- An attacker compromises the npm publisher account, package registry path, or release process for
@pionex/pionex-ai-kit. - The attacker publishes a malicious package version under the expected package name.
- A user or agent installs the Skill dependency without an exact version or integrity constraint.
- npm resolves and installs the attacker-controlled release.
- The agent invokes
pionex-trade-clifor a legitimate bot-management operation. - The malicious CLI executes with the user's local privileges and access to Pionex credentials.
- It can steal credentials, transmit account or trading information to an attacker-controlled destination, modify tr ...[truncated 1065 chars]
- An attacker compromises the npm publisher account, package registry path, or release process for
- Remediation
View remediation
Remediation Suggestions
- Pin
@pionex/pionex-ai-kitto an exact reviewed version rather than allowing unrestricted resolution. - Use a lockfile and verify the package archive with an expected integrity hash or cryptographic signature.
- Restrict installation to the official npm registry and disable unexpected registry overrides where practical.
- Review the resolved package and its transitive dependencies, particularly credential loading, logging, subprocess execution, and network-request code.
- Document the expected Pionex API endpoints and reject connections to unapproved destinations through egress controls where feasible.
- Run the CLI under a dedicated, minimally privileged operating-system account or sandbox.
- Use a dedicated Pionex API key with only the bot permissions required for the requested operation. Do not grant withdrawal or unrelated account permissions.
- Rotate credentials promptly if dependency compromise is suspected, and retain audit logs for package installation and trading operations.
- Require user confirmation immediately before consequential write operations, even when a prior dry run succeeded.
- Pin
