T08 · Insecure Dependencies
- Location
README.md:7- Finding
Unpinned Third-Party Package Installation and Execution
- Content
View full analysis
Vulnerability Details
File Location:
README.md:7-14
Vulnerability Type: Unverified and unpinned npm supply-chain dependency
Risk Level: MediumThe project instructs users to install or directly execute an external npm package:
bash npm install -g @cyberdrk/onchainOr run directly with npx:
bash npx @cyberdrk/onchain price btcTechnical Analysis
Both commands retrieve executable code from the npm registry without pinning an exact reviewed version or verifying an integrity digest. The
npxcommand can download and immediately execute the currently resolved package release. Global installation also places unreviewed package code in the user's global npm environment.The audited project contains only
README.mdandSKILL.md; it does not include the CLI source code, a package manifest, a lockfile, integrity hashes, or vendored dependencies. Consequently, the behavior and dependency graph of@cyberdrk/onchaincannot be verified from this artifact. There is no evidence that the referenced package is currently malicious, but the documented installation procedure exposes users to package-account compromise, malicious updates, dependency compromise, or unexpected behavior introduced by a newer release.The risk is elevated because the documented CLI processes Coinbase and Binance API credentials and reads configuration from locations such as
~/.config/onchain/config.json5.Attack Path
- An attacker compromises the npm publisher account, the package itself, or one of its transitive dependencies.
- The attacker publishes a malicious release under the referenced package name.
- A user or agent follows the documentation and runs the unpinned
npm install -gornpxcommand. - npm resolves and downloads the attacker-controlled release.
- Malicious package code or lifecycle scripts execute with the privileges of the invoking user.
- The code can attempt to read accessibl ...[truncated 791 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin installation instructions to an exact, reviewed package version rather than resolving the latest release.
- Publish the CLI source code,
package.json, lockfile, and build instructions so its implementation and transitive dependencies can be audited. - Provide and verify package integrity information and npm provenance attestations for published releases.
- Audit or disable npm lifecycle scripts where possible, for example by reviewing the package before installation and using
--ignore-scriptswhen lifecycle scripts are unnecessary. - Avoid global installation where practical. Run the CLI in an isolated, least-privileged environment with narrowly restricted filesystem and network access.
- Require read-only, minimally scoped exchange API keys. Explicitly prohibit withdrawal permissions and recommend disabling trading permissions unless essential.
- Store credentials in a protected secret-management facility, restrict configuration-file permissions, and avoid exposing secrets through command output or logs.
- Establish dependency monitoring, reproducible builds, signed releases, and a documented process for reviewing package updates before deployment.
