T08 · Insecure Dependencies
- Location
SKILL.md:138- Finding
Unpinned npx Package Execution Creates a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 138
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable code snippet:
shell npx onekey agent craftsman-agent/craftsman-agent generate_perler_bead_pindou '{"prompt":"","images":["https://minecraft.wiki/images/Diamond_Pickaxe_JE3_BE3.png?7409d="],"width":16,"height":16,"brand":"default"}'Technical Analysis
The documented command instructs users to execute the
onekeypackage throughnpxwithout specifying an exact version. If the package is not already installed locally,npxmay retrieve and execute it from the configured package registry.No pinned version, lockfile, integrity hash, verified installation procedure, or reviewed local copy is provided for this execution path. Consequently, the code executed by this command can change after the Skill has been audited. This creates exposure to package-account compromise, malicious future releases, dependency substitution, and registry configuration attacks.
The project metadata states that the Skill has no Node dependencies, so this remotely resolved CLI is also outside the declared dependency set.
Attack Path
- An attacker compromises the publisher account or distribution channel for the
onekeypackage, publishes a malicious future release, or causes the victim to resolve the package through a malicious registry. - A user follows the command documented in
SKILL.md. - Because no version is pinned,
npxresolves and downloads the currently available package. - Package lifecycle logic or the CLI entrypoint executes with the privileges of the invoking user.
- The malicious package can access resources available to that user, including project files and environment variables.
Impact Assessment
Successful exploitation permits arbitrary code execution with the invoking user's privileges. The affected scope may include readable or writable loca ...[truncated 316 chars]
- An attacker compromises the publisher account or distribution channel for the
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a specifically reviewed version, for example
npx --yes onekey@<audited-version> .... - Declare the package in a package manifest and commit a lockfile with integrity metadata.
- Use
npm ciagainst the committed lockfile rather than resolving an unconstrained package at execution time. - Document the expected registry, official package publisher, and package provenance.
- Enable package-signature or provenance verification where supported.
- Prefer a vendored, checksummed, or preinstalled audited CLI in security-sensitive environments.
- Run the CLI with minimal privileges and expose only the environment variables and files required for the operation.
- Pin the CLI to a specifically reviewed version, for example
