T08 · Insecure Dependencies
- Location
SKILL.md:185- Finding
Unpinned npm Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 185, 276, and 433
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
Line 185:
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":"demo"}'Line 276:
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"}'Line 433:
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 commands invoke the
onekeynpm package without specifying a version, lockfile, or integrity hash. When an appropriate package is not already available locally,npxcan retrieve it from the configured npm registry and execute its entry point.Consequently, the code executed by these commands ...[truncated 1911 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin
onekeyto a specific, reviewed version in every example:shell npx --yes onekey@<verified-version> agent craftsman-agent/craftsman-agent ... -
Verify the expected package publisher, package provenance, and registry before execution. Document the approved npm registry explicitly.
-
Maintain a project manifest and lockfile where practical, and install dependencies with lockfile enforcement, such as
npm ci, rather than resolving the latest package dynamically. -
Use npm provenance and integrity verification where supported. Review the pinned package and its transitive dependencies before approving updates.
-
Prefer the documented HTTPS REST API examples when installing and executing a local package is unnecessary.
-
Run the CLI in a least-privileged, isolated environment with access only to required files and network destinations.
-
Supply the gateway key only for the duration of the required command, avoid exposing unrelated secrets in the process environment, and rotate the key if execution of a compromised package is suspected.
-
