T08 · Insecure Dependencies
- Location
SKILL.md:214- Finding
Unpinned npm Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:214,SKILL.md:322, andSKILL.md:486
Vulnerability Type: Unpinned third-party package execution
Risk Level: MediumVulnerable Code
shell npx onekey agent craftsman-agent/craftsman-agent toy_generator_design_draft '{"prompt":"Stuffed Steve in Minecraft","images":["https://static.aiagenta2z.com/container/craftsman-agent/default/static/derekzz/a49f905b-4e0d-40c6-af7a-c37be3d1741e/3ccb042bbd9b41c3a9f5d31c564ef4c0.png"],"asset_size":"small","template_id":"stuffed-toy","provider_model_id":"default","session_name":"3D Build Plan","tag_list":"","mode":"basic"}'shell npx onekey agent craftsman-agent/craftsman-agent toy_generator_task_create '{"prompt":"","images":["https://static.aiagenta2z.com/container/craftsman-agent/default/static/derekzz/a49f905b-4e0d-40c6-af7a-c37be3d1741e/3ccb042bbd9b41c3a9f5d31c564ef4c0.png"],"multi_view":{"front":"https://craftsman-agent.aiagenta2z.com/static/derekzz/75302fb3-b0f4-4bfe-a406-1c97eda64dbf/build_front.png","right":"https://craftsman-agent.aiagenta2z.com/static/derekzz/75302fb3-b0f4-4bfe-a406-1c97eda64dbf/build_right.png","back":"https://craftsman-agent.aiagenta2z.com/static/derekzz/75302fb3-b0f4-4bfe-a406-1c97eda64dbf/build_back.png"},"asset_size":"small","template_id":"stuffed-toy","provider_model_id":"tripo/tripo","model":"P1-20260311","session_name":"3D Build Plan","tag_list":"","mode":"basic"}'shell npx onekey agent craftsman-agent/craftsman-agent toy_generator_task_poll '{"task_id":"96b2116e-4b86-4d3c-af04-baf0da0c23ac","kwargs":{"provider_model_id":"tripo/tripo","mode":"basic"}}'Technical Analysis
The documented CLI commands invoke
onekeythroughnpxwithout specifying an exact package version or verifying package integrity. If the package is absent locally,npxmay resolve, download, and execute the version currently published in the configured npm registry.This creates a supply-chain trust boundary that is not ca ...[truncated 1789 chars]
- Remediation
View remediation
Remediation Suggestions
-
Prefer the documented HTTPS REST API examples, which avoid executing an npm package locally.
-
If the CLI is required, identify and document its authoritative publisher and trusted registry.
-
Pin the package to a reviewed exact version rather than allowing dynamic resolution:
shell npx --yes onekey@<reviewed-exact-version> ... -
Maintain a lockfile and verify npm integrity metadata. In controlled environments, install dependencies with
npm cifrom a committed, reviewed lockfile. -
Do not execute the package with elevated privileges.
-
Run the CLI in a restricted container or sandbox with minimal filesystem and network access.
-
Use a short-lived, least-privilege gateway token and expose it only to the process that requires it.
-
Review package updates before changing the pinned version, including lifecycle scripts and transitive dependencies.
-
Revoke and rotate the gateway key immediately if execution of an untrusted package is suspected.
-
