T08 · Insecure Dependencies
- Location
SKILL.md:241- Finding
Unpinned npm Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:241-243
Additional Locations:SKILL.md:350-352,SKILL.md:442-444
Vulnerability Type: Insecure dependency resolution and execution
Risk Level: MediumVulnerable Code
bash npx onekey agent craftsman-agent/craftsman-agent 3d_generator_task_create '{"prompt": "Generate A Figurine of Steve in Minecraft", "images": [], "provider_model_id": "tripo/tripo", "session_name": "3D Build Plan", "tag_list": "", "mode": "basic"}' npx onekey agent craftsman-agent/craftsman-agent 3d_generator_task_poll '{"task_id": "96b2116e-4b86-4d3c-af04-baf0da0c23ac", "kwargs": {"provider_model_id": "tripo/tripo", "mode": "basic"}}'The same unpinned command pattern is repeated for image-to-model and multiview-to-model operations.
Technical Analysis
The documented workflow invokes the npm package
onekeythroughnpxwithout specifying a reviewed version. When the package is unavailable locally,npxcan retrieve and execute the version currently resolved from the configured npm registry.The project provides no lockfile, integrity hash, vendored implementation, package publisher verification, or version constraint for this executable dependency. Consequently, the code that runs may differ from the code originally assessed. A compromised package release, compromised maintainer account, registry substitution, or malicious package resolved through an untrusted registry configuration could result in arbitrary local code execution.
The commands are intended to run after
DEEPNLP_ONEKEY_ROUTER_ACCESShas been exported. Code executed by the package therefore inherits access to that credential as well as the invoking user's local privileges.Attack Path
-
A user obtains and exports the OneKey credential as instructed:
bash export DEEPNLP_ONEKEY_ROUTER_ACCESS=your_access_key -
The user runs one of the documented
npx onekey ...commands. -
If no trusted local copy is availab ...[truncated 1398 chars]
-
- Remediation
View remediation
Remediation Suggestions
-
Pin the CLI to a specific, reviewed version:
bash npx --yes onekey@<audited-version> agent craftsman-agent/craftsman-agent ... -
Verify and document the exact npm package name, publisher, registry, version, and expected integrity hash.
-
Use a project-level dependency manifest and lockfile so dependency resolution is reproducible.
-
Configure npm to use a trusted HTTPS registry and avoid executing the command under registry overrides that have not been reviewed.
-
Prefer installation with lifecycle scripts disabled where compatible:
bash npm install --ignore-scripts --save-exact onekey@<audited-version> -
Review the pinned package and its transitive dependencies before use.
-
Run the CLI in a restricted environment with minimal filesystem access and only the required environment variable.
-
Prefer the documented direct HTTPS API workflow when the npm CLI and its dependency chain cannot be independently verified.
-
Rotate the OneKey credential immediately if an unexpected package version has already been executed.
-
