T08 · Insecure Dependencies
- Location
SKILL.md:558- Finding
Unpinned npm Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 558–561
Vulnerability Type: Unpinned third-party package execution
Risk Level: MediumVulnerable Code
bash export DEEPNLP_ONEKEY_ROUTER_ACCESS=your_access_key npx onekey agent craftsman-agent/craftsman-agent image_generator '{"prompt":"Introduction to Difference between MCPs,Skills and Agents CLIs","images":[],"card_count":1,"template_id":"logo-designer","api_id":"image_generator","asset_size":[{"width":1080,"height":1080,"ratio":"1:1"}],"mode":"basic","session_id":"31d57eb9-9a37-4808-9c5b-1bfbb2abf5fb","session_name":"AI Poster of MCPs/CLIs/Agents","tag_list":"","model":"default","styles":["Editorial grid layout with corporate dark deep monochromatic tones"],"design_config":{"template_id":"logo-designer","card_count":1,"card_count_source":"default","channel_profile":"generic","audience_profile":"general","age_band":"auto","profile_version":"1.0.0","geometry_source":"profile","resolved_profiles":[{"type":"channel","id":"generic","version":"1.0.0"},{"type":"audience","id":"general","version":"1.0.0"}],"language":"auto","mode":"standard","text_model":"default","image_model":"default","styles":["Editorial grid layout with corporate dark deep monochromatic tones"],"constraints":["Limit target output build to 6 high-density pages max for physical double folding print"],"brief_inputs":[{"id":"binp-1","type":"prompt","content":"Introduction to Difference between MCPs,Skills and Agents CLIs"},{"id":"binp-2","type":"style","content":"Editorial grid layout with corporate dark deep monochromatic tones"},{"id":"binp-3","type":"constraint","content":"Limit target output build to 6 high-density pages max for physical double folding print"},{"id":"binp-1786857754660","type":"prompt","content":"Custom newly configured prompt parameter specifications instructions layout metric..."}],"text_styles":{"brand":{"color":"#8b5cf6","font":"Playfair Display","font_size":"20px","font_weight":"600","text_align" ...[truncated 4092 chars]- Remediation
View remediation
Remediation Suggestions
-
Pin the CLI to an audited exact version, for example:
bash npx --yes onekey@X.Y.Z agent craftsman-agent/craftsman-agent image_generator '...'Replace
X.Y.Zwith a reviewed version. Do not use version ranges or tags such aslatest. -
Prefer declaring the package in a project manifest and committing a lockfile. Install with a deterministic command such as
npm ciso dependency resolution follows the reviewed lockfile. -
Verify package provenance before execution:
- Confirm the expected package owner and publisher.
- Use the intended npm registry explicitly.
- Review package signatures or provenance attestations where available.
- Validate integrity metadata and monitor ownership or release changes.
-
Disable or tightly control lifecycle scripts during installation where compatible with the package:
bash npm ci --ignore-scriptsIf lifecycle scripts are required, review them before allowing execution.
-
Reduce credential exposure. Supply the access key only to the process that requires it, run the CLI in an isolated environment, and avoid exposing unrelated secrets through inherited environment variables.
-
Prefer the documented direct HTTPS API request when practical, because it avoids executing a dynamically retrieved npm CLI package.
-
Rotate
DEEPNLP_ONEKEY_ROUTER_ACCESSimmediately if an untrusted package version may already have run, and review gateway usage logs for unauthorized activity.
-
